aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-02 21:12:56 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-02 21:13:48 -0500
commit67e183b1331e7b3cfd554fc2a59ab1c77fa97c23 (patch)
treeda9ed0f71523136c46d9c08c1f4e03cb99eef76c /src
parent2ddd385ba114ebde4341e4b14b62e9971ac988c1 (diff)
downloadcryptography-67e183b1331e7b3cfd554fc2a59ab1c77fa97c23.tar.gz
cryptography-67e183b1331e7b3cfd554fc2a59ab1c77fa97c23.tar.bz2
cryptography-67e183b1331e7b3cfd554fc2a59ab1c77fa97c23.zip
SSL_CTX_set_client_cert_engine was added in 0.9.8i
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/bindings/openssl/ssl.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/ssl.py b/src/cryptography/hazmat/bindings/openssl/ssl.py
index 7cc60cab..dd71375e 100644
--- a/src/cryptography/hazmat/bindings/openssl/ssl.py
+++ b/src/cryptography/hazmat/bindings/openssl/ssl.py
@@ -24,6 +24,7 @@ static const long Cryptography_HAS_TLSEXT_STATUS_REQ_CB;
static const long Cryptography_HAS_STATUS_REQ_OCSP_RESP;
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_TYPE;
static const long Cryptography_HAS_GET_SERVER_TMP_KEY;
+static const long Cryptography_HAS_SSL_CTX_SET_CLIENT_CERT_ENGINE;
/* Internally invented symbol to tell us if SNI is supported */
static const long Cryptography_HAS_TLSEXT_HOSTNAME;
@@ -234,8 +235,6 @@ int SSL_CTX_add_client_CA(SSL_CTX *, X509 *);
void SSL_CTX_set_client_CA_list(SSL_CTX *, Cryptography_STACK_OF_X509_NAME *);
-int SSL_CTX_set_client_cert_engine(SSL_CTX *, ENGINE *);
-
/* SSL_SESSION */
void SSL_SESSION_free(SSL_SESSION *);
@@ -253,6 +252,7 @@ MACROS = """
const COMP_METHOD *SSL_get_current_compression(SSL *);
const COMP_METHOD *SSL_get_current_expansion(SSL *);
const char *SSL_COMP_get_name(const COMP_METHOD *);
+int SSL_CTX_set_client_cert_engine(SSL_CTX *, ENGINE *);
unsigned long SSL_set_mode(SSL *, unsigned long);
unsigned long SSL_get_mode(SSL *);
@@ -616,6 +616,14 @@ static const long Cryptography_HAS_GET_SERVER_TMP_KEY = 0;
long (*SSL_get_server_tmp_key)(SSL *, EVP_PKEY **) = NULL;
#endif
+/* Added in 0.9.8i */
+#if OPENSSL_VERSION_NUMBER < 0x0090809fL
+int (*SSL_CTX_set_client_cert_engine)(SSL_CTX *, ENGINE *) = NULL;
+static const long Cryptography_HAS_SSL_CTX_SET_CLIENT_CERT_ENGINE = 0;
+# else
+static const long Cryptography_HAS_SSL_CTX_SET_CLIENT_CERT_ENGINE = 1;
+#endif
+
"""
CONDITIONAL_NAMES = {
@@ -723,4 +731,8 @@ CONDITIONAL_NAMES = {
"Cryptography_HAS_GET_SERVER_TMP_KEY": [
"SSL_get_server_tmp_key",
],
+
+ "Cryptography_HAS_SSL_CTX_SET_CLIENT_CERT_ENGINE": [
+ "SSL_CTX_set_client_cert_engine",
+ ],
}