aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-13 08:40:38 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-13 08:40:38 -0700
commitb8a9c9e6243716b353b0786dae1e6e7d94f474a8 (patch)
tree6739f2d5229ae54cf90e81693af854c55550fd07
parenta83d2183ab42fa190d9c9d35a694edd9ded5943f (diff)
parent2c69aba9ca4d84252d62083b30812cc3bdbbc194 (diff)
downloadcryptography-b8a9c9e6243716b353b0786dae1e6e7d94f474a8.tar.gz
cryptography-b8a9c9e6243716b353b0786dae1e6e7d94f474a8.tar.bz2
cryptography-b8a9c9e6243716b353b0786dae1e6e7d94f474a8.zip
Merge pull request #791 from reaperhulk/098e-fix
RHEL 5's inaccurate OPENSSL_VERSION_NUMBER is a real pain
-rw-r--r--cryptography/hazmat/bindings/openssl/err.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/cryptography/hazmat/bindings/openssl/err.py b/cryptography/hazmat/bindings/openssl/err.py
index 616eeac6..551d8217 100644
--- a/cryptography/hazmat/bindings/openssl/err.py
+++ b/cryptography/hazmat/bindings/openssl/err.py
@@ -20,7 +20,7 @@ INCLUDES = """
TYPES = """
static const int Cryptography_HAS_REMOVE_THREAD_STATE;
static const int Cryptography_HAS_098H_ERROR_CODES;
-static const int Cryptography_HAS_098C_ERROR_CODES;
+static const int Cryptography_HAS_098C_CAMELLIA_CODES;
struct ERR_string_data_st {
unsigned long error;
@@ -265,6 +265,7 @@ static const int ASN1_F_SMIME_TEXT;
static const int ASN1_R_NO_CONTENT_TYPE;
static const int ASN1_R_NO_MULTIPART_BODY_FAILURE;
static const int ASN1_R_NO_MULTIPART_BOUNDARY;
+/* These were added in OpenSSL 0.9.8c. */
static const int EVP_F_CAMELLIA_INIT_KEY;
static const int EVP_R_CAMELLIA_KEY_SETUP_FAILED;
"""
@@ -293,10 +294,10 @@ static const int ASN1_R_NO_MULTIPART_BOUNDARY = 0;
#endif
// OpenSSL 0.9.8c+
-#if OPENSSL_VERSION_NUMBER >= 0x0090803fL
-static const long Cryptography_HAS_098C_ERROR_CODES = 1;
+#ifdef EVP_F_CAMELLIA_INIT_KEY
+static const long Cryptography_HAS_098C_CAMELLIA_CODES = 1;
#else
-static const long Cryptography_HAS_098C_ERROR_CODES = 0;
+static const long Cryptography_HAS_098C_CAMELLIA_CODES = 0;
static const int EVP_F_CAMELLIA_INIT_KEY = 0;
static const int EVP_R_CAMELLIA_KEY_SETUP_FAILED = 0;
#endif
@@ -316,7 +317,7 @@ CONDITIONAL_NAMES = {
"ASN1_R_NO_MULTIPART_BODY_FAILURE",
"ASN1_R_NO_MULTIPART_BOUNDARY",
],
- "Cryptography_HAS_098C_ERROR_CODES": [
+ "Cryptography_HAS_098C_CAMELLIA_CODES": [
"EVP_F_CAMELLIA_INIT_KEY",
"EVP_R_CAMELLIA_KEY_SETUP_FAILED"
]