Closed poetimp closed 4 years ago
Code that has worked for years is now getting an error when decrypting a string. Is there something new that I need to do to support the latest openssl?
$rsa = Crypt::OpenSSL::RSA->new_private_key($privkeytext); $rsa->use_sslv23_padding(); $clrText = $rsa->decrypt($encString);
The private key is id_rsa.pem format Text encrypted using a public key in id_rsa.pub.pem format
Changed to $rsa->use_pkcs1_padding();
And that fixed it.
Code that has worked for years is now getting an error when decrypting a string. Is there something new that I need to do to support the latest openssl?
$rsa = Crypt::OpenSSL::RSA->new_private_key($privkeytext); $rsa->use_sslv23_padding(); $clrText = $rsa->decrypt($encString);
The private key is id_rsa.pem format Text encrypted using a public key in id_rsa.pub.pem format