Accepting request 708462 from home:mcepl:branches:devel:languages:python
- Add fix_OpenSSL111c.patch patch to ensure compatibility with OpenSSL 1.1.1c. gl#m2crypto/m2crypto#258 OBS-URL: https://build.opensuse.org/request/show/708462 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-M2Crypto?expand=0&rev=82
This commit is contained in:
parent
2f2c5ffc03
commit
143ba85e2b
28
fix_OpenSSL111c.patch
Normal file
28
fix_OpenSSL111c.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/tests/test_rsa.py
|
||||
+++ b/tests/test_rsa.py
|
||||
@@ -113,6 +113,8 @@ class RSATestCase(unittest.TestCase):
|
||||
with self.assertRaises(TypeError):
|
||||
priv.private_encrypt(self.gen_callback, RSA.pkcs1_padding)
|
||||
|
||||
+ @unittest.skipIf(m2.OPENSSL_VERSION_NUMBER < 0x1010103f,
|
||||
+ 'Relies on fix which happened only in OpenSSL 1.1.1c')
|
||||
def test_public_encrypt(self):
|
||||
priv = RSA.load_key(self.privkey)
|
||||
# pkcs1_padding, pkcs1_oaep_padding
|
||||
@@ -124,13 +126,11 @@ class RSATestCase(unittest.TestCase):
|
||||
|
||||
# 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)
|
||||
+ res = priv.private_decrypt(ctxt, RSA.sslv23_padding)
|
||||
+ self.assertEqual(res, self.data)
|
||||
|
||||
# no_padding
|
||||
- with self.assertRaises(RSA.RSAError):
|
||||
+ with six.assertRaisesRegex(self, TypeError, 'data too small'):
|
||||
priv.public_encrypt(self.data, RSA.no_padding)
|
||||
|
||||
# Type-check the data to be encrypted.
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 7 22:21:23 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add fix_OpenSSL111c.patch patch to ensure compatibility with
|
||||
OpenSSL 1.1.1c. gl#m2crypto/m2crypto#258
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 12:27:35 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
@ -26,6 +26,7 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: https://gitlab.com/m2crypto/m2crypto
|
||||
Source: https://files.pythonhosted.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
|
||||
Patch0: fix_OpenSSL111c.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing}
|
||||
|
Loading…
Reference in New Issue
Block a user