diff options
author | Brendan McCollam <brendan@mccoll.am> | 2015-09-07 19:55:09 -0500 |
---|---|---|
committer | Brendan McCollam <brendan@mccoll.am> | 2015-09-07 19:55:09 -0500 |
commit | ae454130b0bbdbb60e9d2081eca6d181eb6fa686 (patch) | |
tree | 70004a36b926fa4f187bc02d185aab27e4cbc17c /src/_cffi_src/openssl/ssl.py | |
parent | 1b3b3ce19d76ef3d1d492db6d85fd2df52781e2c (diff) | |
parent | 786ded65fd2f7a2ef851e9f6f132f5fc5bc962d9 (diff) | |
download | cryptography-ae454130b0bbdbb60e9d2081eca6d181eb6fa686.tar.gz cryptography-ae454130b0bbdbb60e9d2081eca6d181eb6fa686.tar.bz2 cryptography-ae454130b0bbdbb60e9d2081eca6d181eb6fa686.zip |
Merge branch 'master' into add_name_to_oids
Diffstat (limited to 'src/_cffi_src/openssl/ssl.py')
-rw-r--r-- | src/_cffi_src/openssl/ssl.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py index 7a7968a1..ccabb872 100644 --- a/src/_cffi_src/openssl/ssl.py +++ b/src/_cffi_src/openssl/ssl.py @@ -45,6 +45,7 @@ static const long Cryptography_HAS_SSL_OP_NO_TICKET; static const long Cryptography_HAS_NETBSD_D1_METH; static const long Cryptography_HAS_NEXTPROTONEG; static const long Cryptography_HAS_ALPN; +static const long Cryptography_HAS_SET_CERT_CB; static const long SSL_FILETYPE_PEM; static const long SSL_FILETYPE_ASN1; @@ -204,6 +205,8 @@ Cryptography_STACK_OF_X509_NAME *SSL_get_client_CA_list(const SSL *); int SSL_get_error(const SSL *, int); int SSL_do_handshake(SSL *); int SSL_shutdown(SSL *); +int SSL_renegotiate(SSL *); +int SSL_renegotiate_pending(SSL *); const char *SSL_get_cipher_list(const SSL *, int); Cryptography_STACK_OF_SSL_CIPHER *SSL_get_ciphers(const SSL *); @@ -406,6 +409,12 @@ void SSL_CTX_set_alpn_select_cb(SSL_CTX *, void SSL_get0_alpn_selected(const SSL *, const unsigned char **, unsigned *); long SSL_get_server_tmp_key(SSL *, EVP_PKEY **); + +/* SSL_CTX_set_cert_cb is introduced in OpenSSL 1.0.2. To continue to support + * earlier versions some special handling of these is necessary. + */ +void SSL_CTX_set_cert_cb(SSL_CTX *, int (*)(SSL *, void *), void *); +void SSL_set_cert_cb(SSL *, int (*)(SSL *, void *), void *); """ CUSTOMIZATIONS = """ @@ -609,6 +618,16 @@ static const long Cryptography_HAS_ALPN = 0; static const long Cryptography_HAS_ALPN = 1; #endif +/* SSL_CTX_set_cert_cb was added in OpenSSL 1.0.2. */ +#if OPENSSL_VERSION_NUMBER < 0x10002001L || defined(LIBRESSL_VERSION_NUMBER) +void (*SSL_CTX_set_cert_cb)(SSL_CTX *, int (*)(SSL *, void *), void *) = NULL; +void (*SSL_set_cert_cb)(SSL *, int (*)(SSL *, void *), void *) = NULL; +static const long Cryptography_HAS_SET_CERT_CB = 0; +#else +static const long Cryptography_HAS_SET_CERT_CB = 1; +#endif + + #if defined(OPENSSL_NO_COMP) || defined(LIBRESSL_VERSION_NUMBER) static const long Cryptography_HAS_COMPRESSION = 0; typedef void COMP_METHOD; |