From: Timo Sirainen Date: Thu, 3 Jul 2014 16:34:57 +0000 (+0300) Subject: Compile fix for old systems without SSL_OP_NO_COMPRESSION X-Git-Tag: 2.2.14.rc1~283 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7103db837f941fd4de8a3f828c99febbcedb45a2;p=thirdparty%2Fdovecot%2Fcore.git Compile fix for old systems without SSL_OP_NO_COMPRESSION --- diff --git a/src/lib-ssl-iostream/iostream-openssl-context.c b/src/lib-ssl-iostream/iostream-openssl-context.c index 45b7593ba7..c8c60c6edf 100644 --- a/src/lib-ssl-iostream/iostream-openssl-context.c +++ b/src/lib-ssl-iostream/iostream-openssl-context.c @@ -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); diff --git a/src/login-common/ssl-proxy-openssl.c b/src/login-common/ssl-proxy-openssl.c index 0382af5f98..1bdb7eb8d6 100644 --- a/src/login-common/ssl-proxy-openssl.c +++ b/src/login-common/ssl-proxy-openssl.c @@ -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