lundi 27 février 2017

OpenSSL Error - read finished A decryption failed or bad record mac

I am using RestClient to access an external API using a certificate available. I have useed it like this,


require 'rest-client'

p12 = OpenSSL::PKCS12.new(File.read('/root/cert.p12'), 'password')

RestClient::Request.execute(method: :post, url: "https:myurl.com", ssl_client_cert: p12.certificate, ssl_cert_key: p12.key, payload: { data: "" }, verify_ssl: OpenSSL::SSL::VERIFY_NONE)

On doing the above steps, I get :


OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: decryption failed or bad record mac

Can someone help me out in this?

Aucun commentaire:

Enregistrer un commentaire