Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCSP stapling support #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

OCSP stapling support #401

wants to merge 1 commit into from

Conversation

p-mongo
Copy link

@p-mongo p-mongo commented Aug 28, 2020

This is an initial implementation of OCSP stapling support, intended to work with MongoDB.

So far I tested it on login.live.com using the following script:

require 'byebug'
require 'openssl'

OpenSSL.debug = true

host = 'login.live.com:443'

s = TCPSocket.open(*host.split(':'))
context = OpenSSL::SSL::SSLContext.new
context.status_cb = lambda do |socket, resp|
  #byebug
  true
end
ss = OpenSSL::SSL::SSLSocket.new(s, context)
ss.hostname = host.split(':').first
ss.status_type = 1
puts 'conn'
ss.connect

p ss.peer_cert

What kind of test coverage and other changes are needed to get this merged?

* call-seq:
* ssl.status_type = status_type -> status_type
*
* Set to 1 to request that the server staples an OCSP response to the
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should technically be TLSEXT_STATUSTYPE_ocsp.

@p-mongo
Copy link
Author

p-mongo commented Aug 28, 2020

Fixes #295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants