summaryrefslogtreecommitdiff
path: root/dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch')
-rw-r--r--dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch b/dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch
new file mode 100644
index 000000000000..9a14d4606019
--- /dev/null
+++ b/dev-python/cryptography/files/cryptography-2.1.4-libressl-2.7-x509.patch
@@ -0,0 +1,23 @@
+diff -ur a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py
+--- a/src/_cffi_src/openssl/x509.py 2017-07-27 05:11:29.000000000 +0200
++++ b/src/_cffi_src/openssl/x509.py 2018-03-23 10:28:00.387774214 +0100
+@@ -254,8 +254,7 @@
+
+ const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *);
+
+-/* in 1.1.0 becomes const ASN1_BIT_STRING, const X509_ALGOR */
+-void X509_get0_signature(ASN1_BIT_STRING **, X509_ALGOR **, X509 *);
++void X509_get0_signature(const ASN1_BIT_STRING **, const X509_ALGOR **, const X509 *);
+
+ long X509_get_version(X509 *);
+
+@@ -338,7 +337,8 @@
+ CUSTOMIZATIONS = """
+ /* Added in 1.0.2 beta but we need it in all versions now due to the great
+ opaquing. */
+-#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
++#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ /* from x509/x_x509.c version 1.0.2 */
+ void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
+ const X509 *x)