diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2018-05-30 22:31:47 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-05-31 10:31:47 +0800 |
commit | 8a64f1f2fbea73f0b7a4725768dc9597d240c661 (patch) | |
tree | 38379a1da072116328118a7e8ba266050ad34c4d | |
parent | 015483830765fbdd01ce393bd1f02c9f72344a03 (diff) | |
download | cryptography-8a64f1f2fbea73f0b7a4725768dc9597d240c661.tar.gz cryptography-8a64f1f2fbea73f0b7a4725768dc9597d240c661.tar.bz2 cryptography-8a64f1f2fbea73f0b7a4725768dc9597d240c661.zip |
Removes branches in bindings for various OpenSSL 1.1.0 prereleases (#4269)
* Remove defines for openssl 1.1.0 pre
* Update bio.py
* Update dh.py
* Update dsa.py
* Update rsa.py
* Update x509_vfy.py
* Compress branches
-rw-r--r-- | src/_cffi_src/openssl/bio.py | 2 | ||||
-rw-r--r-- | src/_cffi_src/openssl/cryptography.py | 6 | ||||
-rw-r--r-- | src/_cffi_src/openssl/dh.py | 4 | ||||
-rw-r--r-- | src/_cffi_src/openssl/dsa.py | 4 | ||||
-rw-r--r-- | src/_cffi_src/openssl/rsa.py | 4 | ||||
-rw-r--r-- | src/_cffi_src/openssl/x509_vfy.py | 6 |
6 files changed, 8 insertions, 18 deletions
diff --git a/src/_cffi_src/openssl/bio.py b/src/_cffi_src/openssl/bio.py index 0955dcd7..a95dbf47 100644 --- a/src/_cffi_src/openssl/bio.py +++ b/src/_cffi_src/openssl/bio.py @@ -40,7 +40,7 @@ void BIO_clear_retry_flags(BIO *); """ CUSTOMIZATIONS = """ -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE4 +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 int BIO_up_ref(BIO *b) { CRYPTO_add(&b->references, 1, CRYPTO_LOCK_BIO); return 1; diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py index 4f9378d3..137e2f9e 100644 --- a/src/_cffi_src/openssl/cryptography.py +++ b/src/_cffi_src/openssl/cryptography.py @@ -43,12 +43,6 @@ INCLUDES = """ (OPENSSL_VERSION_NUMBER < 0x1000209f || CRYPTOGRAPHY_IS_LIBRESSL) #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 \ (OPENSSL_VERSION_NUMBER < 0x10100000 || CRYPTOGRAPHY_IS_LIBRESSL) -#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE4 \ - (OPENSSL_VERSION_NUMBER < 0x10100004 || CRYPTOGRAPHY_IS_LIBRESSL) -#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 \ - (OPENSSL_VERSION_NUMBER < 0x10100005 || CRYPTOGRAPHY_IS_LIBRESSL) -#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE6 \ - (OPENSSL_VERSION_NUMBER < 0x10100006 || CRYPTOGRAPHY_IS_LIBRESSL) """ TYPES = """ diff --git a/src/_cffi_src/openssl/dh.py b/src/_cffi_src/openssl/dh.py index 7ab06ae9..64172eb6 100644 --- a/src/_cffi_src/openssl/dh.py +++ b/src/_cffi_src/openssl/dh.py @@ -45,8 +45,8 @@ int Cryptography_i2d_DHxparams_bio(BIO *bp, DH *x); """ CUSTOMIZATIONS = """ -/* These functions were added in OpenSSL 1.1.0-pre5 (beta2) */ -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 +/* These functions were added in OpenSSL 1.1.0 */ +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { diff --git a/src/_cffi_src/openssl/dsa.py b/src/_cffi_src/openssl/dsa.py index d61b692e..f960d59a 100644 --- a/src/_cffi_src/openssl/dsa.py +++ b/src/_cffi_src/openssl/dsa.py @@ -34,8 +34,8 @@ int DSA_generate_parameters_ex(DSA *, int, unsigned char *, int, """ CUSTOMIZATIONS = """ -/* These functions were added in OpenSSL 1.1.0-pre5 (beta2) */ -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 +/* These functions were added in OpenSSL 1.1.0 */ +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py index 13de2aae..9455433e 100644 --- a/src/_cffi_src/openssl/rsa.py +++ b/src/_cffi_src/openssl/rsa.py @@ -75,8 +75,8 @@ int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *, int) = NULL; #endif -/* These functions were added in OpenSSL 1.1.0-pre5 (beta2) */ -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 +/* These functions were added in OpenSSL 1.1.0 */ +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { /* If the fields n and e in r are NULL, the corresponding input diff --git a/src/_cffi_src/openssl/x509_vfy.py b/src/_cffi_src/openssl/x509_vfy.py index 58069eb1..a4b91200 100644 --- a/src/_cffi_src/openssl/x509_vfy.py +++ b/src/_cffi_src/openssl/x509_vfy.py @@ -273,7 +273,7 @@ static const long Cryptography_HAS_X509_V_FLAG_TRUSTED_FIRST = 0; static const long X509_V_FLAG_TRUSTED_FIRST = 0; #endif -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE6 +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 Cryptography_STACK_OF_X509_OBJECT *X509_STORE_get0_objects(X509_STORE *ctx) { return ctx->objs; } @@ -283,9 +283,7 @@ X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *store) { int X509_OBJECT_get_type(const X509_OBJECT *x) { return x->type; } -#endif -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5 /* from x509/x509_vfy.c */ X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) { @@ -295,9 +293,7 @@ X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) X509 *X509_OBJECT_get0_X509(X509_OBJECT *x) { return x->data.x509; } -#endif -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110 static const long Cryptography_HAS_X509_STORE_CTX_GET_ISSUER = 0; typedef void *X509_STORE_CTX_get_issuer_fn; X509_STORE_CTX_get_issuer_fn (*X509_STORE_get_get_issuer)(X509_STORE *) = NULL; |