Skip to content

Commit 5b46cf4

Browse files
syzzercron2
authored andcommitted
Disable SSL compression
As reported in trac #502, SSL compression can cause problems in some corner cases. OpenVPN does not need SSL compression, since the control channel is low bandwidth. This does not influence the data channel compressen (i.e. --comp or --comp-lzo). Even though this has not yet been relevant for OpenVPN (since an attacker can not easily control contents of control channel messages), SSL compression has been used in the CRIME and BREACH attacks on TLS. TLS 1.3 will probably even remove support for compression all together, for exactly this reason. Since we don't need it, and SSL compression causes issues, let's just disable it in OpenSSL builds. PolarSSL has no run-time flag to disable compression, but is by default compiled without compression. Signed-off-by: Steffan Karger <[email protected]> Acked-by: Arne Schwabe <[email protected]> Acked-by: Gert Doering <[email protected]> Message-Id: <[email protected]> URL: http://article.gmane.org/gmane.network.openvpn.devel/9453 Signed-off-by: Gert Doering <[email protected]> (cherry picked from commit 5d52337)
1 parent 4ec70ca commit 5b46cf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openvpn/ssl_openssl.c

+4
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ tls_ctx_set_options (struct tls_root_ctx *ctx, unsigned int ssl_flags)
237237
#ifdef SSL_OP_NO_TLSv1_2
238238
if (tls_ver_min > TLS_VER_1_2 || tls_ver_max < TLS_VER_1_2)
239239
sslopt |= SSL_OP_NO_TLSv1_2;
240+
#endif
241+
#ifdef SSL_OP_NO_COMPRESSION
242+
/* Disable compression - flag not available in OpenSSL 0.9.8 */
243+
sslopt |= SSL_OP_NO_COMPRESSION;
240244
#endif
241245
SSL_CTX_set_options (ctx->ctx, sslopt);
242246
}

0 commit comments

Comments
 (0)