aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyli <cyli@twistedmatrix.com>2013-11-10 18:09:45 -0800
committercyli <cyli@twistedmatrix.com>2013-12-20 13:39:44 -0800
commitbef5768d9e691c094f19bc4e611367d2e7b8b573 (patch)
tree0155ccd3dc1d5298090d00048b8b3cfa5ccb15b8
parente0562502d3006c9bc4968e76f02274ec7ed80582 (diff)
downloadcryptography-bef5768d9e691c094f19bc4e611367d2e7b8b573.tar.gz
cryptography-bef5768d9e691c094f19bc4e611367d2e7b8b573.tar.bz2
cryptography-bef5768d9e691c094f19bc4e611367d2e7b8b573.zip
Move some SNI APIs to macros
-rw-r--r--cryptography/hazmat/backends/openssl/ssl.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/cryptography/hazmat/backends/openssl/ssl.py b/cryptography/hazmat/backends/openssl/ssl.py
index d91c89a6..09d342b8 100644
--- a/cryptography/hazmat/backends/openssl/ssl.py
+++ b/cryptography/hazmat/backends/openssl/ssl.py
@@ -233,11 +233,7 @@ long SSL_CTX_get_timeout(const SSL_CTX *);
/* SNI APIs were introduced in OpenSSL 1.0.0. To continue to support
* earlier versions some special handling of these is necessary.
*/
-void SSL_set_tlsext_host_name(SSL *, char *);
const char *SSL_get_servername(const SSL *, const int);
-void SSL_CTX_set_tlsext_servername_callback(
- SSL_CTX *,
- int (*cb)(const SSL *, int *, void *));
"""
MACROS = """
@@ -288,6 +284,14 @@ const SSL_METHOD *SSLv23_client_method();
/*- These aren't macros these arguments are all const X on openssl > 1.0.x -*/
SSL_CTX *SSL_CTX_new(const SSL_METHOD *);
long SSL_CTX_get_timeout(const SSL_CTX *);
+
+/* SNI APIs were introduced in OpenSSL 1.0.0. To continue to support
+ * earlier versions some special handling of these is necessary.
+ */
+void SSL_set_tlsext_host_name(SSL *, char *);
+void SSL_CTX_set_tlsext_servername_callback(
+ SSL_CTX *,
+ int (*cb)(const SSL *, int *, void *));
"""
CUSTOMIZATIONS = """