Saturday, 15 June 2013

ssl - How do I get the peer_cert for a https request using Ruby? -



ssl - How do I get the peer_cert for a https request using Ruby? -

how can access peer_cert when making ssl request?

i've updated ruby ssl certs rvm osx-ssl-certs update all

what i'm trying is

require 'httpclient' c = httpclient.new r = c.get( "https://gmail.com" ) puts r.peer_cert

but maintain getting either openssl::ssl::sslerror: ssl_connect returned=1 errno=0 state=sslv3 read server hello a: sslv3 alert handshake failure

or

openssl::ssl::sslerror: hostname "gmail.com" not match server certificate

what first error mean? there way set property version automatically?

i'm able load info on url using httparty , farday, in case don't know here access actual ssl cert used.

you can't peer cert until succesfully create connection, , you're getting error in succesfully making connection. have upgraded latest httpclient? many servers changed ssl handshake configurations in response recent vulnerabilties, , new httpclient released in response same, perhaps neccesary compatible new server configurations.

ruby ssl https

No comments:

Post a Comment