From: Charles Rajesh Date: 2010-09-01T16:02:59+09:00 Subject: certificate verify failed Am using a X509 PEM certificate with the key for integrating a payment gateway api. But am not able to establish the SSL connection as the certificate verification fails.. http.use_ssl = true #certificate file http.cert = OpenSSL::X509::Certificate.new(File.read('sdk-cert.pem')) #private key for that certificate http.key = OpenSSL::PKey::RSA.new(File.read('sdk-key.pem')) http.verify_mode = OpenSSL::SSL::VERIFY_PEER http.start{http.request_get(uri.path){|res| print res.body }} Error: (via Web) OpenSSL::SSL::SSLError in TestController#test certificate verify failed I get the following error while i verified through command-line using OpenSSL: >openssl verify sdk-cert.pem "error 20 at 0 depth lookup:unable to get local issuer certificate" Is there anything missing in the certificate ?? kindly help to sort out the issue.. -- Posted via http://www.ruby-forum.com/.