C
Charles Rajesh
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:Key::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:
Is there anything missing in the certificate ?? kindly help to sort out
the issue..
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:Key::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:
"error 20 at 0 depth lookup:unable to get local issuer certificate"openssl verify sdk-cert.pem
Is there anything missing in the certificate ?? kindly help to sort out
the issue..