toddr / Crypt-OpenSSL-RSA

Release history of Crypt-OpenSSL-RSA
https://metacpan.org/pod/Crypt::OpenSSL::RSA
Other
8 stars 25 forks source link

RSA.xs:218: OpenSSL error: sslv3 rollback attack #26

Closed poetimp closed 4 years ago

poetimp commented 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

poetimp commented 4 years ago

Changed to $rsa->use_pkcs1_padding();

And that fixed it.