From: Brian Candler Date: 2012-09-20T16:52:44+09:00 Subject: Re: net-https error on x509 certs Tuj www wrote in post #1076663: > /usr/lib/ruby/1.8/net/http.rb:567:in `initialize': can't convert > OpenSSL::X509::Certificate into String (TypeError) Hint: you passed an OpenSSL::X509::Certificate to a method which was expecting a String. > session.ca_file = OpenSSL::X509::Certificate.new ca That's the problem. ca_file needs to be a string which contains the filename of a CA certificate. If you read /usr/lib/ruby/1.8/net/https.rb (or wherever it is on your system) you'll find the docs inline: : ca_file, ca_file=((|path|)) Sets path of a CA certification file in PEM format. The file can contrain several CA certificats. : ca_path, ca_path=((|path|)) Sets path of a CA certification directory containing certifications in PEM format. -- Posted via http://www.ruby-forum.com/.