Accepting request 708732 from home:mcepl:branches:devel:languages:python

- Replace fix_OpenSSL111c.patch with proper new release 0.35.1
  (there is really not much more in it).

OBS-URL: https://build.opensuse.org/request/show/708732
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-M2Crypto?expand=0&rev=83
This commit is contained in:
Matej Cepl 2019-06-08 07:30:27 +00:00 committed by Git OBS Bridge
parent 143ba85e2b
commit 35ca199081
5 changed files with 10 additions and 33 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7f771ad1c8ef6ac4a906950813b82f9f205b4ae61ae30fe490bc41781173f1b9
size 1117318

3
M2Crypto-0.35.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:617c683089bf846bc217ecf26b333d86984aa0ed808a40ed975962328f67c41b
size 1117466

View File

@ -1,28 +0,0 @@
--- 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.

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jun 8 08:58:56 CEST 2019 - Matej Cepl <mcepl@suse.com>
- Replace fix_OpenSSL111c.patch with proper new release 0.35.1
(there is really not much more in it).
-------------------------------------------------------------------
Fri Jun 7 22:21:23 CEST 2019 - Matej Cepl <mcepl@suse.com>

View File

@ -19,14 +19,13 @@
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-M2Crypto
Version: 0.34.0
Version: 0.35.1
Release: 0
Summary: Crypto and SSL toolkit for Python
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}