Skip to content

Commit

Permalink
security/py-cryptography: Fix with libressl 3.6
Browse files Browse the repository at this point in the history
PR:			270318
Approved by:		sunpoet (maintainer)
Approved by:		tcberner (mentor, implicit: libressl)
Differential Revision:	https://reviews.freebsd.org/D39224
  • Loading branch information
Zirias committed Mar 28, 2023
1 parent 0c1a56e commit b5363bc
Showing 1 changed file with 31 additions and 8 deletions.
@@ -1,4 +1,27 @@
--- src/_cffi_src/openssl/cryptography.py.orig 2022-10-17 10:52:36 UTC
--- src/_cffi_src/openssl/crypto.py.orig 2023-03-22 07:29:15 UTC
+++ src/_cffi_src/openssl/crypto.py
@@ -74,11 +74,8 @@ CUSTOMIZATIONS = """
# define OPENSSL_DIR SSLEAY_DIR
#endif

+static const long Cryptography_HAS_OPENSSL_CLEANUP = 1;
#if CRYPTOGRAPHY_IS_LIBRESSL
-static const long Cryptography_HAS_OPENSSL_CLEANUP = 0;
-
-void (*OPENSSL_cleanup)(void) = NULL;
-
/* This function has a significantly different signature pre-1.1.0. since it is
* for testing only, we don't bother to expose it on older OpenSSLs.
*/
@@ -89,7 +86,6 @@ int (*Cryptography_CRYPTO_set_mem_functions)(
void (*)(void *, const char *, int)) = NULL;

#else
-static const long Cryptography_HAS_OPENSSL_CLEANUP = 1;
static const long Cryptography_HAS_MEM_FUNCTIONS = 1;

int Cryptography_CRYPTO_set_mem_functions(
--- src/_cffi_src/openssl/cryptography.py.orig 2021-08-24 17:17:17 UTC
+++ src/_cffi_src/openssl/cryptography.py
@@ -33,17 +33,17 @@ INCLUDES = """
#endif
Expand All @@ -24,7 +47,7 @@
!defined(OPENSSL_NO_ENGINE)) || defined(USE_OSRANDOM_RNG_FOR_TESTING)
#define CRYPTOGRAPHY_NEEDS_OSRANDOM_ENGINE 1
#else
--- src/_cffi_src/openssl/dh.py.orig 2022-10-17 11:10:57 UTC
--- src/_cffi_src/openssl/dh.py.orig 2021-08-24 17:17:17 UTC
+++ src/_cffi_src/openssl/dh.py
@@ -37,117 +37,9 @@ int Cryptography_i2d_DHxparams_bio(BIO *bp, DH *x);
"""
Expand Down Expand Up @@ -144,7 +167,7 @@

/* These functions were added in OpenSSL 1.1.0f commit d0c50e80a8 */
/* Define our own to simplify support across all versions. */
--- src/_cffi_src/openssl/evp.py.orig 2023-02-24 07:28:50 UTC
--- src/_cffi_src/openssl/evp.py.orig 2021-08-24 17:02:37 UTC
+++ src/_cffi_src/openssl/evp.py
@@ -203,7 +203,20 @@ int (*EVP_PKEY_set1_tls_encodedpoint)(EVP_PKEY *, cons
size_t) = NULL;
Expand All @@ -168,7 +191,7 @@
static const long Cryptography_HAS_ONESHOT_EVP_DIGEST_SIGN_VERIFY = 0;
static const long Cryptography_HAS_RAW_KEY = 0;
static const long Cryptography_HAS_EVP_DIGESTFINAL_XOF = 0;
--- src/_cffi_src/openssl/fips.py.orig 2022-10-17 11:12:47 UTC
--- src/_cffi_src/openssl/fips.py.orig 2021-08-24 17:17:17 UTC
+++ src/_cffi_src/openssl/fips.py
@@ -17,11 +17,5 @@ int FIPS_mode(void);
"""
Expand All @@ -182,7 +205,7 @@
static const long Cryptography_HAS_FIPS = 1;
-#endif
"""
--- src/_cffi_src/openssl/ocsp.py.orig 2022-10-17 11:14:50 UTC
--- src/_cffi_src/openssl/ocsp.py.orig 2021-08-24 17:17:17 UTC
+++ src/_cffi_src/openssl/ocsp.py
@@ -77,7 +77,6 @@ int i2d_OCSP_RESPDATA(OCSP_RESPDATA *, unsigned char *

Expand Down Expand Up @@ -255,7 +278,7 @@
}
#endif
"""
--- src/_cffi_src/openssl/ssl.py.orig 2022-10-17 11:17:08 UTC
--- src/_cffi_src/openssl/ssl.py.orig 2021-08-24 17:17:17 UTC
+++ src/_cffi_src/openssl/ssl.py
@@ -515,12 +515,7 @@ CUSTOMIZATIONS = """
// users have upgraded. PersistentlyDeprecated2020
Expand All @@ -270,7 +293,7 @@

#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111
static const long Cryptography_HAS_KEYLOG = 0;
@@ -586,8 +581,6 @@ static const long Cryptography_HAS_TLS_ST = 1;
@@ -586,8 +581,6 @@ static const long TLS_ST_OK = 0;
#endif

#if CRYPTOGRAPHY_IS_LIBRESSL
Expand All @@ -279,7 +302,7 @@
long (*DTLS_set_link_mtu)(SSL *, long) = NULL;
long (*DTLS_get_link_min_mtu)(SSL *) = NULL;
#endif
--- src/_cffi_src/openssl/x509.py.orig 2022-10-17 11:26:23 UTC
--- src/_cffi_src/openssl/x509.py.orig 2021-08-24 17:02:37 UTC
+++ src/_cffi_src/openssl/x509.py
@@ -276,33 +276,8 @@ void X509_REQ_get0_signature(const X509_REQ *, const A
"""
Expand Down

0 comments on commit b5363bc

Please sign in to comment.