On 2019-06-04 12:12:35 [+0200], Kurt Roeckx wrote: > On Tue, Jun 04, 2019 at 12:46:07AM +0200, Sebastian Andrzej Siewior wrote: > > > > So if I decoded it right, it does > > > > | fbuf = sha1("The magic words are squeamish ossifrage."); /* 0xbf, > > 0xf0, 0x04 … */ > > | flen = RSA_public_encrypt(20, fbuf, tobuf, ) > > | /* flen -> 128 */ > > | r = RSA_private_decrypt(128, tobuf, tobuf2, ) > > > > before the change, RSA_private_decrypt() used to return an error > > r -> -1, rsa routines|rsa_ossl_private_decrypt|padding check failed> > > > > after that, it return `20' and probably passes. Would it be likely that > > m2crypto tested that an openssl bug existed which got fixed? > > I have no idea what they're testing, but I expect that if you just > encrypt something, that decryting that should work.
But it didn't. Let me ping upstream: Matěj, could you please take a look at https://bugs.debian.org/929903 and check if it is okay the test no longer fails or if openssl suddenly eats up the error code. Afterall: --- tests/test_rsa.py 2019-06-03 21:16:33.840000000 +0000 +++ tests/test_rsa.py.new 2019-06-04 12:14:21.168000000 +0000 @@ -124,10 +124,10 @@ # sslv23_padding ctxt = priv.public_encrypt(self.data, RSA.sslv23_padding) - with self.assertRaises(RSA.RSAError): - priv.private_decrypt(ctxt, RSA.sslv23_padding) - with self.assertRaises(RSA.RSAError): - priv.private_decrypt(ctxt, RSA.sslv23_padding) + ptxt = priv.private_decrypt(ctxt, RSA.sslv23_padding) + self.assertEqual(ptxt, self.data) + ptxt = priv.private_decrypt(ctxt, RSA.sslv23_padding) + self.assertEqual(ptxt, self.data) # no_padding with self.assertRaises(RSA.RSAError): passes now and the result is `equal'. > Kurt Sebastian