Using http-access2 to get peer_cert

S

sutch

Is there a way to use http-access2 to obtain the peer's SSL
certificate?

I can do this with net/http:

https = Net::HTTP.new(host, port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
cert = nil
https.start { |h| cert = OpenSSL::X509::Certificate.new(h.peer_cert) }
# cert now contains the peer's SSL certificate

Does http-access2 have something similar?

Thanks,
Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top