I'm trying to open a HTTP connection via SSL.
I gathered the following certificates from Internet explorer:
- SSO_CA root certificate (.cer file, Base64 encoded)
- client certificate (PEM)
- Private Key file (RSA)
Here is my ruby code:
require 'http-access2' client = HTTPAccess2::Client.new() client.ssl_config.set_client_cert_file('cert.pem', 'private.key') client.ssl_config.set_trust_ca('ca.cer') puts client.get('https://host/test").content
However I still get this error:
at depth 0 - 20: unable to get local issuer certificate
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/httpclient.rb:1039:in `connect': certificate verify failed (OpenSSL::SSL::SSLError)
Any help is greatly appreciated.
Edited by: Christian Loos on Jul 16, 2008 4:16 PM