How to get https server certificate using Net::HTTP or HTTPClient Ruby lib?
相关问题
- Mechanize getting “Errno::ECONNRESET: Connection r
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- Can ServiceStack JsonServiceClient send a get requ
- Tomcat and SSL Client certificate
相关文章
- 请大神帮忙 post向https接口发送数据 部署到服务器为什么运行一会后就会报空指针
- ssl配置问题
- Ruby using wrong version of openssl
- Intermittent “sslv3 alert handshake failure” under
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
I found a solution using HTTPClient lib
Make sure you have httpclient gem installed
I don't think that you can do it with either of these libraries, or even with much more advanced libcurl and it's wrappers. But as an alternative - if you have
openssl
command line tool available, you can invoke it and parse the output, the command you need is as follows:openssl s_client -connect my.server.name:443
It will give you a full dump of the certificate as well as some parsed information - subject, issuer, etc.