[Pkg-openssl-devel] Bug#929903: openssl: m2crypto test case regression

Matěj Cepl mcepl at cepl.eu
Tue Jun 4 13:24:12 BST 2019


Sebastian Andrzej Siewior píše v Út 04. 06. 2019 v 14:15 +0200:
> 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:

OK, I have this commit now in the master 
https://gitlab.com/m2crypto/m2crypto/commit/f287d7145b5f but I am
still not certain that sslv23_padding and especially no_padding
should lead to error, shouldn't it?

Why did the test passed before otherwise?

Best,

Matěj

> --- 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'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-openssl-devel/attachments/20190604/4a4a632c/attachment.sig>


More information about the Pkg-openssl-devel mailing list