aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-07 15:01:55 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-07 15:01:55 -0800
commitc24003e98398473eada5b6fb895fa6f3345f4d5d (patch)
tree12fa812cfd884ee04cadbd85b907b5e70849d1be
parent128e331f55dd4fee9111af50ee5a41be39557556 (diff)
parentfd4430665b72c2500e5bf73d3974d559c9756de9 (diff)
downloadcryptography-c24003e98398473eada5b6fb895fa6f3345f4d5d.tar.gz
cryptography-c24003e98398473eada5b6fb895fa6f3345f4d5d.tar.bz2
cryptography-c24003e98398473eada5b6fb895fa6f3345f4d5d.zip
Merge pull request #748 from reaperhulk/098e-compat
0.9.8e Compatibility (CentOS/RHEL 5)
-rw-r--r--cryptography/hazmat/bindings/openssl/nid.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/nid.py b/cryptography/hazmat/bindings/openssl/nid.py
index a772d374..cb83c1ba 100644
--- a/cryptography/hazmat/bindings/openssl/nid.py
+++ b/cryptography/hazmat/bindings/openssl/nid.py
@@ -14,6 +14,8 @@
INCLUDES = ""
TYPES = """
+static const int Cryptography_HAS_ECDSA_SHA2_NIDS;
+
static const int NID_undef;
static const int NID_dsa;
static const int NID_dsaWithSHA;
@@ -189,6 +191,23 @@ MACROS = """
"""
CUSTOMIZATIONS = """
+// OpenSSL 0.9.8g+
+#if OPENSSL_VERSION_NUMBER >= 0x0090807fL
+static const long Cryptography_HAS_ECDSA_SHA2_NIDS = 1;
+#else
+static const long Cryptography_HAS_ECDSA_SHA2_NIDS = 0;
+static const int NID_ecdsa_with_SHA224 = 0;
+static const int NID_ecdsa_with_SHA256 = 0;
+static const int NID_ecdsa_with_SHA384 = 0;
+static const int NID_ecdsa_with_SHA512 = 0;
+#endif
"""
-CONDITIONAL_NAMES = {}
+CONDITIONAL_NAMES = {
+ "Cryptography_HAS_ECDSA_SHA2_NIDS": [
+ "NID_ecdsa_with_SHA224",
+ "NID_ecdsa_with_SHA256",
+ "NID_ecdsa_with_SHA384",
+ "NID_ecdsa_with_SHA512",
+ ],
+}