[packages/python-cryptography] - added openssl3.0.1 patch

qboosh qboosh at pld-linux.org
Wed Mar 9 22:04:06 CET 2022


commit f7fe41d041ed49b60b47b41e806e98bb7135b434
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 9 22:06:08 2022 +0100

    - added openssl3.0.1 patch

 python-cryptography-openssl3.0.1.patch | 24 ++++++++++++++++++++++++
 python-cryptography.spec               |  2 ++
 2 files changed, 26 insertions(+)
---
diff --git a/python-cryptography.spec b/python-cryptography.spec
index 40f93fc..b01cf2f 100644
--- a/python-cryptography.spec
+++ b/python-cryptography.spec
@@ -20,6 +20,7 @@ Source1:	https://files.pythonhosted.org/packages/source/c/cryptography-vectors/c
 # Source1-md5:	79785df0f2d43f05895991b7e067a2ce
 Patch0:		openssl3.patch
 Patch1:		openssl3-tests.patch
+Patch2:		%{name}-openssl3.0.1.patch
 URL:		https://cryptography.io/
 BuildRequires:	openssl-devel >= 3.0.0
 BuildRequires:	rpm-build >= 4.6
@@ -134,6 +135,7 @@ Dokumentacja API modułu cryptography.
 %prep
 %setup -q -n cryptography-%{version} %{?with_tests:-a1}
 %patch0 -p1
+%patch2 -p1
 
 # Do not test legacy, disabled by default algorithms
 # See man OSSL_PROVIDER-legacy(7)
diff --git a/python-cryptography-openssl3.0.1.patch b/python-cryptography-openssl3.0.1.patch
new file mode 100644
index 0000000..e24f227
--- /dev/null
+++ b/python-cryptography-openssl3.0.1.patch
@@ -0,0 +1,24 @@
+https://github.com/pyca/cryptography/pull/6403
+
+From 076560a9507bbe26180f499adf750bc3851b97e8 Mon Sep 17 00:00:00 2001
+From: Alex Gaynor <alex.gaynor at gmail.com>
+Date: Mon, 11 Oct 2021 09:43:28 -0400
+Subject: [PATCH] Specify the out length when obtaining the tag for poly1305
+
+---
+ src/cryptography/hazmat/backends/openssl/poly1305.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cryptography/hazmat/backends/openssl/poly1305.py b/src/cryptography/hazmat/backends/openssl/poly1305.py
+index 35f6819ce87..2ddae9847a4 100644
+--- a/src/cryptography/hazmat/backends/openssl/poly1305.py
++++ b/src/cryptography/hazmat/backends/openssl/poly1305.py
+@@ -51,7 +51,7 @@ def update(self, data):
+ 
+     def finalize(self):
+         buf = self._backend._ffi.new("unsigned char[]", _POLY1305_TAG_SIZE)
+-        outlen = self._backend._ffi.new("size_t *")
++        outlen = self._backend._ffi.new("size_t *", _POLY1305_TAG_SIZE)
+         res = self._backend._lib.EVP_DigestSignFinal(self._ctx, buf, outlen)
+         self._backend.openssl_assert(res != 0)
+         self._backend.openssl_assert(outlen[0] == _POLY1305_TAG_SIZE)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-cryptography.git/commitdiff/f7fe41d041ed49b60b47b41e806e98bb7135b434



More information about the pld-cvs-commit mailing list