aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <mozo@mozo.jp>2017-05-21 03:17:27 +0900
committerAlex Gaynor <alex.gaynor@gmail.com>2017-05-20 11:17:27 -0700
commit8bb9cc629b33e80a8544d7a3a2a55f96549a0259 (patch)
tree8f67abe202bd3570f3a2997b62e03c0b03bec9f4 /src/_cffi_src
parent51032351297b9bf7d783b7138ac0c142d8e38918 (diff)
downloadcryptography-8bb9cc629b33e80a8544d7a3a2a55f96549a0259.tar.gz
cryptography-8bb9cc629b33e80a8544d7a3a2a55f96549a0259.tar.bz2
cryptography-8bb9cc629b33e80a8544d7a3a2a55f96549a0259.zip
More accurate LibreSSL detection (#3530)
* More accurate LibreSSL detection * Update x509_vfy.py change approach to use ifndef
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/x509_vfy.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/x509_vfy.py b/src/_cffi_src/openssl/x509_vfy.py
index 9e93e120..ff83981c 100644
--- a/src/_cffi_src/openssl/x509_vfy.py
+++ b/src/_cffi_src/openssl/x509_vfy.py
@@ -231,9 +231,17 @@ static const long X509_V_ERR_SUITE_B_INVALID_CURVE = 0;
static const long X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM = 0;
static const long X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED = 0;
static const long X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 = 0;
+/* These 3 defines are unavailable in LibreSSL 2.5.x, but may be added
+ in the future... */
+#ifndef X509_V_ERR_HOSTNAME_MISMATCH
static const long X509_V_ERR_HOSTNAME_MISMATCH = 0;
+#endif
+#ifndef X509_V_ERR_EMAIL_MISMATCH
static const long X509_V_ERR_EMAIL_MISMATCH = 0;
+#endif
+#ifndef X509_V_ERR_IP_ADDRESS_MISMATCH
static const long X509_V_ERR_IP_ADDRESS_MISMATCH = 0;
+#endif
/* X509_V_FLAG_TRUSTED_FIRST is also new in 1.0.2+, but it is added separately
below because it shows up in some earlier 3rd party OpenSSL packages. */