aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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",
+ ],
+
}