diff options
author | Aviv Palivoda <palaviv@gmail.com> | 2017-05-20 01:24:17 +0300 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-05-19 17:24:17 -0500 |
commit | 0d92ff8a1680911019dab64deeb4f7ea67224492 (patch) | |
tree | 9e9dece647e892753439ff2f12c84d42ab21f64f /src/_cffi_src/openssl/pem.py | |
parent | d2574f5b9d8fd6a8e26fad6fd0f439ed6e494391 (diff) | |
download | cryptography-0d92ff8a1680911019dab64deeb4f7ea67224492.tar.gz cryptography-0d92ff8a1680911019dab64deeb4f7ea67224492.tar.bz2 cryptography-0d92ff8a1680911019dab64deeb4f7ea67224492.zip |
Add PEM_write_bio_DHxparams, d2i_DHxparams_bio, i2d_DHxparams_bio (#3485)
* Add PEM_write_bio_DHxparams
* Define PEM_write_bio_DHxparams only if EVP_PKEY_DHX defined.
Both added in commit afb14cda in openssl
* Add d2i_DHxparams_bio and i2d_DHxparams_bio bindings
* Fix bindings addition
* change condtional bindings to be after 1.1.0f
* Change i2d_DHxparams_bio return type
* define Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio
* Remove d2i_DHxparams_bio, i2d_DHxparams_bio bindings
* Add declarations for Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio
* Move Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio declaration to MACROS
* Add Cryptography_d2i_DHxparams_bio, Cryptography_i2d_DHxparams_bio and PEM_write_bio_DHxparams to _coditionals.py
* Make sure we did not define EVP_PKEY_DHX
Diffstat (limited to 'src/_cffi_src/openssl/pem.py')
-rw-r--r-- | src/_cffi_src/openssl/pem.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/pem.py b/src/_cffi_src/openssl/pem.py index 1d292a2e..5c1bc180 100644 --- a/src/_cffi_src/openssl/pem.py +++ b/src/_cffi_src/openssl/pem.py @@ -82,7 +82,11 @@ int PEM_write_bio_ECPrivateKey(BIO *, EC_KEY *, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *); int PEM_write_bio_DHparams(BIO *, DH *); +int PEM_write_bio_DHxparams(BIO *, DH *); """ CUSTOMIZATIONS = """ +#if !defined(EVP_PKEY_DHX) || EVP_PKEY_DHX == -1 +int (*PEM_write_bio_DHxparams)(BIO *, DH *) = NULL; +#endif """ |