From c6e8ed4e4afa60b308ad2a80b8b0cefb653a6e7bf0660d54ec78359219eea69b Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Thu, 17 Sep 2015 14:30:34 +0000
Subject: [PATCH] Accepting request 331785 from Cloud:OpenStack:Master
- Add disable-uneven-sizes-tests.patch (bnc#944204)
openssl in SLE12SP1 doesn't allow uneven bit sizes for rsa keys
OBS-URL: https://build.opensuse.org/request/show/331785
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=18
---
disable-uneven-sizes-tests.patch | 14 ++++++++++++++
python-cryptography.changes | 6 ++++++
python-cryptography.spec | 4 ++++
3 files changed, 24 insertions(+)
create mode 100644 disable-uneven-sizes-tests.patch
diff --git a/disable-uneven-sizes-tests.patch b/disable-uneven-sizes-tests.patch
new file mode 100644
index 0000000..2a932b1
--- /dev/null
+++ b/disable-uneven-sizes-tests.patch
@@ -0,0 +1,14 @@
+Index: cryptography-1.0/tests/hazmat/primitives/test_rsa.py
+===================================================================
+--- cryptography-1.0.orig/tests/hazmat/primitives/test_rsa.py
++++ cryptography-1.0/tests/hazmat/primitives/test_rsa.py
+@@ -91,7 +91,8 @@ class TestRSA(object):
+ ("public_exponent", "key_size"),
+ itertools.product(
+ (3, 5, 65537),
+- (1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1536, 2048)
++ #(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1536, 2048)
++ (1024, 1026, 1028, 1030, 1536, 2048)
+ )
+ )
+ def test_generate_rsa_keys(self, backend, public_exponent, key_size):
diff --git a/python-cryptography.changes b/python-cryptography.changes
index 4e4c503..db8931b 100644
--- a/python-cryptography.changes
+++ b/python-cryptography.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Sep 17 13:11:06 UTC 2015 - tbechtold@suse.com
+
+- Add disable-uneven-sizes-tests.patch (bnc#944204)
+ openssl in SLE12SP1 doesn't allow uneven bit sizes for rsa keys
+
-------------------------------------------------------------------
Sat Aug 22 10:30:08 UTC 2015 - tbechtold@suse.com
diff --git a/python-cryptography.spec b/python-cryptography.spec
index dcb5bc9..95cb42d 100644
--- a/python-cryptography.spec
+++ b/python-cryptography.spec
@@ -28,6 +28,8 @@ Source1: https://pypi.python.org/packages/source/c/cryptography/cryptogra
Source2: %{name}.keyring
Source3: https://pypi.python.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
Source4: https://pypi.python.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz.asc
+# PATCH-FIX-SLE disable-uneven-sizes-tests.patch bnc#944204
+Patch1: disable-uneven-sizes-tests.patch
BuildRequires: libopenssl-devel
BuildRequires: python-cffi >= 1.1.0
BuildRequires: python-devel
@@ -68,6 +70,8 @@ functions.
# prepare vectors module
tar xvzf %{SOURCE3}
+%patch1 -p1
+
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build