How to validate SSL certificate chain in ruby with net/http

Posted by maledictus on Stack Overflow See other posts from Stack Overflow or by maledictus
Published on 2010-03-24T13:17:52Z Indexed on 2010/03/24 13:23 UTC
Read the original article Hit count: 187

Filed under:
|
|
|
|

How can I verify the certificates of a site like https://processing.ukash.com/ in ruby with net/http?

https = Net::HTTP.new('processing.ukash.com', 443)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE

Works so far, but how do I verify that it's the right cert now? I saved the certificate from within firefox, but the resulting .pem file has many certificates in it and net/http doesn't seem to like it.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ssl