From baea405f0d507e9c4107b3a8d82f10f8e7f3f40c Mon Sep 17 00:00:00 2001 From: Kseniia Nivnia Date: Tue, 18 Feb 2025 14:43:53 +0000 Subject: [PATCH] Update to 0.23.8 and add skip-testing-sha1.patch Resolves: RHEL-79089 --- .gitignore | 1 + python-awscrt.spec | 7 ++++--- skip-testing-sha1.patch | 40 ++++++++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 skip-testing-sha1.patch diff --git a/.gitignore b/.gitignore index f1729f3..f41c9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /awscrt-0.19.13.tar.gz /awscrt-0.19.19.tar.gz /awscrt-0.20.2.tar.gz +/awscrt-0.23.8.tar.gz diff --git a/python-awscrt.spec b/python-awscrt.spec index a8eee51..501963d 100644 --- a/python-awscrt.spec +++ b/python-awscrt.spec @@ -3,7 +3,7 @@ Python bindings for the AWS Common Runtime} Name: python-awscrt -Version: 0.20.2 +Version: 0.23.8 Release: %autorelease Summary: Python bindings for the AWS Common Runtime @@ -18,14 +18,15 @@ Source0: %{pypi_source awscrt} # one test requires internet connection, skip it Patch0: skip-test-requiring-network.patch +# two tests are checking SHA1 support which is deprecated +Patch1: skip-testing-sha1.patch BuildRequires: python%{python3_pkgversion}-devel - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: openssl-devel - +BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: python%{python3_pkgversion}-websockets # https://bugzilla.redhat.com/show_bug.cgi?id=2180988 diff --git a/skip-testing-sha1.patch b/skip-testing-sha1.patch new file mode 100644 index 0000000..5a70c1c --- /dev/null +++ b/skip-testing-sha1.patch @@ -0,0 +1,40 @@ +diff --git a/test/test_crypto.py b/test/test_crypto.py +index 008b164..d0acfdd 100644 +--- a/test/test_crypto.py ++++ b/test/test_crypto.py +@@ -192,15 +192,11 @@ class TestCredentials(NativeResourceTest): + + def test_rsa_signing_roundtrip(self): + param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256, +- RSASignatureAlgorithm.PSS_SHA256, +- RSASignatureAlgorithm.PKCS1_5_SHA1] ++ RSASignatureAlgorithm.PSS_SHA256] + + for p in param_list: + with self.subTest(msg="RSA Signing Roundtrip using algo p", p=p): +- if (p == RSASignatureAlgorithm.PKCS1_5_SHA1): +- h = Hash.sha1_new() +- else: +- h = Hash.sha256_new() ++ h = Hash.sha256_new() + h.update(b'totally original test string') + digest = h.digest() + +@@ -213,15 +209,11 @@ class TestCredentials(NativeResourceTest): + + def test_rsa_signing_roundtrip_der(self): + param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256, +- RSASignatureAlgorithm.PSS_SHA256, +- RSASignatureAlgorithm.PKCS1_5_SHA1] ++ RSASignatureAlgorithm.PSS_SHA256] + + for p in param_list: + with self.subTest(msg="RSA Signing Roundtrip using algo p", p=p): +- if (p == RSASignatureAlgorithm.PKCS1_5_SHA1): +- h = Hash.sha1_new() +- else: +- h = Hash.sha256_new() ++ h = Hash.sha256_new() + h.update(b'totally original test string') + digest = h.digest() + diff --git a/sources b/sources index e84d030..dfcc533 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (awscrt-0.20.2.tar.gz) = 61b90100d2f0a96f341e5bb51e0b5d9f8f5b1e8a9b1d476e6acdfc447beddc9ba103b60a3c62cbf7c1e0b6ab533beeb02bb6b555e5dc83148d51ca2238859a44 +SHA512 (awscrt-0.23.8.tar.gz) = c8d7b608632a3f09952172c2e3328551e76aa236af39897a392a2c674dda4e3a0fda04094b908a529fd390bf5bf088132eb644b6a4dad4e364e733e6c3e9b28a