Sync from SUSE:ALP:Source:Standard:1.0 saltbundlepy-pyopenssl revision 74be77631337486890f19f97f97c0637

This commit is contained in:
Adrian Schröter 2024-09-10 11:32:10 +02:00
parent 9338ee8cd8
commit 50bc54da11
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,24 @@
diff -urN a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
--- a/src/OpenSSL/crypto.py 2023-04-29 03:22:33.000000000 +0200
+++ b/src/OpenSSL/crypto.py 2024-08-02 10:24:47.843604182 +0200
@@ -39,6 +39,20 @@
)
+# Define X509_CRL_set1_lastUpdate and X509_CRL_set1_nextUpdate if are missing,
+# but X509_CRL_set_lastUpdate and X509_CRL_set_nextUpdate present.
+# It's required for backward compatibility with older openssl versions.
+if (
+ not hasattr(_lib, "X509_CRL_set1_lastUpdate")
+ and hasattr(_lib, "X509_CRL_set_lastUpdate")
+):
+ _lib.X509_CRL_set1_lastUpdate = _lib.X509_CRL_set_lastUpdate
+if (
+ not hasattr(_lib, "X509_CRL_set1_nextUpdate")
+ and hasattr(_lib, "X509_CRL_set_nextUpdate")
+):
+ _lib.X509_CRL_set1_nextUpdate = _lib.X509_CRL_set_nextUpdate
+
__all__ = [
"FILETYPE_PEM",
"FILETYPE_ASN1",

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Aug 2 08:28:18 UTC 2024 - Victor Zhestkov <vzhestkov@suse.com>
- Make the module compatible with older OpenSSL versions
not having `X509_CRL_set1_lastUpdate` and `X509_CRL_set1_nextUpdate`
defined by using `X509_CRL_set_lastUpdate` and
`X509_CRL_set_nextUpdate` instead.
- Added:
* fix-missing-X509_CRL_set1_lastUpdate-_nextUpdate.patch
-------------------------------------------------------------------
Mon May 6 13:50:55 UTC 2024 - Victor Zhestkov <vzhestkov@suse.com>

View File

@ -38,6 +38,9 @@ Patch0: skip-networked-test.patch
Patch1: revert_switch_to_new_utils_deprecation.patch
# Fix missing ASN1_STRING_get0_data definition in old OpenSSL versions
Patch2: fix-missing-ASN1_STRING_get0_data-in-old-openssl.patch
# Fix missing X509_CRL_set1_lastUpdate and X509_CRL_set1_nextUpdate
# in old OpenSSL versions
Patch3: fix-missing-X509_CRL_set1_lastUpdate-_nextUpdate.patch
BuildRequires: %{saltbundlepy_module base >= 3.10}
BuildRequires: %{saltbundlepy_module cffi}
BuildRequires: %{saltbundlepy_module cryptography >= 2.3.0}