diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-05-20 16:08:10 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-05-20 16:08:10 -0700 |
commit | 846ae1c789ed2d611a888295f97bf25d3e36085b (patch) | |
tree | 60f7ac65b1eef109aebb17f852d8bcd2aa645e22 /src | |
parent | 453d2ac482bf4c84207cb2ac7974f6136f27ce5c (diff) | |
download | cryptography-846ae1c789ed2d611a888295f97bf25d3e36085b.tar.gz cryptography-846ae1c789ed2d611a888295f97bf25d3e36085b.tar.bz2 cryptography-846ae1c789ed2d611a888295f97bf25d3e36085b.zip |
add the x25519 NID (#3560)
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/nid.py | 9 | ||||
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/_conditional.py | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/nid.py b/src/_cffi_src/openssl/nid.py index 5ee495ad..2cc4c2ae 100644 --- a/src/_cffi_src/openssl/nid.py +++ b/src/_cffi_src/openssl/nid.py @@ -9,6 +9,8 @@ INCLUDES = """ """ TYPES = """ +static const int Cryptography_HAS_X25519; + static const int NID_undef; static const int NID_dsa; static const int NID_dsaWithSHA; @@ -89,6 +91,7 @@ static const int NID_sect409k1; static const int NID_sect409r1; static const int NID_sect571k1; static const int NID_sect571r1; +static const int NID_X25519; static const int NID_wap_wsg_idm_ecid_wtls1; static const int NID_wap_wsg_idm_ecid_wtls3; static const int NID_wap_wsg_idm_ecid_wtls4; @@ -227,4 +230,10 @@ MACROS = """ """ CUSTOMIZATIONS = """ +#ifndef NID_X25519 +static const long Cryptography_HAS_X25519 = 0; +static const int NID_X25519 = 0; +#else +static const long Cryptography_HAS_X25519 = 1; +#endif """ diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py index 7961bbea..942ac60b 100644 --- a/src/cryptography/hazmat/bindings/openssl/_conditional.py +++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py @@ -173,4 +173,7 @@ CONDITIONAL_NAMES = { "X509_STORE_get_get_issuer", "X509_STORE_set_get_issuer", ], + "Cryptography_HAS_X25519": [ + "NID_X25519", + ], } |