summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-01-27 17:32:06 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-01-27 17:32:06 +0900
commit988878930e50dcca7ac3a3d63cb0410080c6dbd3 (patch)
treefe97bf6d860c447d9aea9a1ea34a4eaef57b1333 /src
parenta722500d62010b80d9ce5af91b11755a7d31589b (diff)
Check SSL_OP_NO_COMPRESSION is available before using it
Diffstat (limited to 'src')
-rw-r--r--src/LibsslTLSContext.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/LibsslTLSContext.cc b/src/LibsslTLSContext.cc
index 1561e4a5..a0ac1623 100644
--- a/src/LibsslTLSContext.cc
+++ b/src/LibsslTLSContext.cc
@@ -57,8 +57,11 @@ TLSContext::TLSContext(TLSSessionSide side)
ERR_error_string(ERR_get_error(), 0)));
}
// Disable SSLv2 and enable all workarounds for buggy servers
- SSL_CTX_set_options(sslCtx_, SSL_OP_ALL|SSL_OP_NO_SSLv2|
- SSL_OP_NO_COMPRESSION);
+ SSL_CTX_set_options(sslCtx_, SSL_OP_ALL | SSL_OP_NO_SSLv2
+#ifdef SSL_OP_NO_COMPRESSION
+ | SSL_OP_NO_COMPRESSION
+#endif // SSL_OP_NO_COMPRESSION
+ );
SSL_CTX_set_mode(sslCtx_, SSL_MODE_AUTO_RETRY);
SSL_CTX_set_mode(sslCtx_, SSL_MODE_ENABLE_PARTIAL_WRITE);
#ifdef SSL_MODE_RELEASE_BUFFERS