]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compile fix for old systems without SSL_OP_NO_COMPRESSION
authorTimo Sirainen <tss@iki.fi>
Thu, 3 Jul 2014 16:34:57 +0000 (19:34 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 3 Jul 2014 16:34:57 +0000 (19:34 +0300)
src/lib-ssl-iostream/iostream-openssl-context.c
src/login-common/ssl-proxy-openssl.c

index 45b7593ba7aaac1bb1b83138931360f9129e636c..c8c60c6edf37fe7169e62c51424d4221307b48d2 100644 (file)
@@ -506,8 +506,10 @@ ssl_iostream_context_init_common(struct ssl_iostream_context *ctx,
 
        /* enable all SSL workarounds, except empty fragments as it
           makes SSL more vulnerable against attacks */
+#ifdef SSL_OP_NO_COMPRESSION
        if (!set->compression)
                ssl_ops |= SSL_OP_NO_COMPRESSION;
+#endif
        SSL_CTX_set_options(ctx->ssl_ctx, ssl_ops);
 #ifdef SSL_MODE_RELEASE_BUFFERS
        SSL_CTX_set_mode(ctx->ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
index 0382af5f9868f3349a11490c6e37913b55a45c85..1bdb7eb8d68de899ddb5491bd2f41634a24d1e63 100644 (file)
@@ -1016,8 +1016,11 @@ ssl_proxy_ctx_init(SSL_CTX *ssl_ctx, const struct master_service_ssl_settings *s
        /* enable all SSL workarounds, except empty fragments as it
           makes SSL more vulnerable against attacks */
        long ssl_ops = SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
+
+#ifdef SSL_OP_NO_COMPRESSION
        if (!set->parsed_opts.compression)
                ssl_ops |= SSL_OP_NO_COMPRESSION;
+#endif
        SSL_CTX_set_options(ssl_ctx, ssl_ops);
 
 #ifdef SSL_MODE_RELEASE_BUFFERS