Skip to content

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

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants