python-cryptography/skip-overflow-tests-32bit.patch
Christian Heimes 189a558764 Update to 42.0.5
resolves: rhbz#2251816
resolves: rhbz#2269618, CVE-2024-26130

Signed-off-by: Christian Heimes <cheimes@redhat.com>
2024-03-21 09:43:51 +01:00

73 lines
2.9 KiB
Diff

From d741901dddd731895346636c0d3556c6fa51fbe6 Mon Sep 17 00:00:00 2001
From: Paul Kehrer <paul.l.kehrer@gmail.com>
Date: Thu, 8 Feb 2024 09:11:21 -0600
Subject: [PATCH] skip overflow aead tests on 32-bit systems
---
tests/hazmat/primitives/test_aead.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/tests/hazmat/primitives/test_aead.py b/tests/hazmat/primitives/test_aead.py
index a1f99ab815ed..2f0d52d82682 100644
--- a/tests/hazmat/primitives/test_aead.py
+++ b/tests/hazmat/primitives/test_aead.py
@@ -56,7 +56,8 @@ def test_chacha20poly1305_unsupported_on_older_openssl(backend):
)
class TestChaCha20Poly1305:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = ChaCha20Poly1305.generate_key()
@@ -197,7 +198,8 @@ def test_buffer_protocol(self, backend):
)
class TestAESCCM:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = AESCCM.generate_key(128)
@@ -378,7 +380,8 @@ def _load_gcm_vectors():
class TestAESGCM:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = AESGCM.generate_key(128)
@@ -525,7 +528,8 @@ def test_aesocb3_unsupported_on_older_openssl(backend):
)
class TestAESOCB3:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = AESOCB3.generate_key(128)
@@ -700,7 +704,8 @@ def test_buffer_protocol(self, backend):
)
class TestAESSIV:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = AESSIV.generate_key(256)
@@ -844,7 +849,8 @@ def test_buffer_protocol(self, backend):
)
class TestAESGCMSIV:
@pytest.mark.skipif(
- sys.platform not in {"linux", "darwin"}, reason="mmap required"
+ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31,
+ reason="mmap and 64-bit platform required",
)
def test_data_too_large(self):
key = AESGCMSIV.generate_key(256)