aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-23 15:00:02 -0500
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-23 15:00:02 -0500
commit22af23ebbbee831f8d9874ebf9080b4b5ed545b7 (patch)
treeff958db0a158eddbc604c51f8707d4c89576c1e9
parentab51df1d664fafe1426748e38ddb125cf31d4052 (diff)
downloadcryptography-22af23ebbbee831f8d9874ebf9080b4b5ed545b7.tar.gz
cryptography-22af23ebbbee831f8d9874ebf9080b4b5ed545b7.tar.bz2
cryptography-22af23ebbbee831f8d9874ebf9080b4b5ed545b7.zip
Also make SSL_OP_NO_COMPRESSION optional
-rw-r--r--cryptography/hazmat/backends/openssl/ssl.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/openssl/ssl.py b/cryptography/hazmat/backends/openssl/ssl.py
index a1acde38..3fd0bf23 100644
--- a/cryptography/hazmat/backends/openssl/ssl.py
+++ b/cryptography/hazmat/backends/openssl/ssl.py
@@ -27,6 +27,11 @@ static const int Cryptography_HAS_TLSEXT_HOSTNAME;
*/
static const int Cryptography_HAS_RELEASE_BUFFERS;
+/* Internally invented symbol to tell us if SSL_OP_NO_COMPRESSION is
+ * supported
+ */
+static const int Cryptography_HAS_OP_NO_COMPRESSION;
+
static const int SSL_FILETYPE_PEM;
static const int SSL_FILETYPE_ASN1;
static const int SSL_ERROR_NONE;
@@ -275,6 +280,13 @@ static const int Cryptography_HAS_RELEASE_BUFFERS = 1;
static const int Cryptography_HAS_RELEASE_BUFFERS = 0;
const int SSL_MODE_RELEASE_BUFFERS = 0;
#endif
+
+#ifdef SSL_OP_NO_COMPRESSION
+static const int Cryptography_HAS_OP_NO_COMPRESSION = 1;
+#else
+static const int Cryptography_HAS_OP_NO_COMPRESSION = 0;
+const int SSL_OP_NO_COMPRESSION = 0;
+#endif
"""
CONDITIONAL_NAMES = {
@@ -294,4 +306,8 @@ CONDITIONAL_NAMES = {
"SSL_MODE_RELEASE_BUFFERS",
],
+ "Cryptography_HAS_OP_NO_COMPRESSION": [
+ "SSL_OP_NO_COMPRESSION",
+ ],
+
}