From 2184e314ebe141dd06ec74ecaa1b767922494b87fddd7b22ba1ab15993157616 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 7 Mar 2019 13:24:45 +0000 Subject: [PATCH] Accepting request 682461 from home:mcepl:branches:devel:languages:python - Fix for compatibility with OpenSSL 1.1.0h by adding the patch 0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch OBS-URL: https://build.opensuse.org/request/show/682461 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-M2Crypto?expand=0&rev=77 --- ...se-ciphercuites-for-TLS1.3-cipher-in.patch | 31 +++++++++++++++++++ python-M2Crypto.changes | 6 ++++ python-M2Crypto.spec | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch diff --git a/0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch b/0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch new file mode 100644 index 0000000..0522170 --- /dev/null +++ b/0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch @@ -0,0 +1,31 @@ +From 862167880780c1b1219b6be3864ba587f0bdddba Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Sat, 2 Mar 2019 17:08:39 +0100 +Subject: [PATCH] tests/test_ssl: use -ciphercuites for TLS1.3 cipher in + openssl1.1 + +The -cipher can not be used in OpenSSL 1.1.b+ for TLS1.3 cipher since +openssl upstream commit 1c31fe7eb093a ("Ignore cipher suites when +setting cipher list"). + +Use -ciphersuites for TLS1.3 cipher as documented. + +Signed-off-by: Sebastian Andrzej Siewior +--- + tests/test_ssl.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/tests/test_ssl.py ++++ b/tests/test_ssl.py +@@ -460,9 +460,10 @@ class MiscSSLClientTestCase(BaseSSLClien + def test_cipher_ok(self): + if OPENSSL111: + TCIPHER = 'TLS_AES_256_GCM_SHA384' ++ self.args = self.args + ['-ciphersuites', TCIPHER] + else: + TCIPHER = 'AES128-SHA' +- self.args = self.args + ['-cipher', TCIPHER] ++ self.args = self.args + ['-cipher', TCIPHER] + + pid = self.start_server(self.args) + try: diff --git a/python-M2Crypto.changes b/python-M2Crypto.changes index 6f6de17..3b136c5 100644 --- a/python-M2Crypto.changes +++ b/python-M2Crypto.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 7 14:14:45 CET 2019 - Matej Cepl + +- Fix for compatibility with OpenSSL 1.1.0h by adding the patch + 0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch + ------------------------------------------------------------------- Tue Mar 5 09:01:46 CET 2019 - Matej Cepl diff --git a/python-M2Crypto.spec b/python-M2Crypto.spec index 618fb86..9c660a6 100644 --- a/python-M2Crypto.spec +++ b/python-M2Crypto.spec @@ -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: 0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing} @@ -78,6 +79,7 @@ Documentation for the Crypto and SSL toolkit for Python %prep %setup -q -n M2Crypto-%{version} +%autopatch -p1 %build export CFLAGS="%{optflags}"