From e1e39a24518a59936a349a66f86527ffa829a262 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 19 Mar 2013 13:46:28 +0000 Subject: [PATCH] Disable compression for DTLS. The only standard compression method is stateful and is incompatible with DTLS. (cherry picked from commit e14b8410ca882da8e9579a2d928706f894c8e1ae) --- ssl/ssl_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 4714d89a4c..26fbe87fbf 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1567,7 +1567,9 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data); ret->extra_certs=NULL; - ret->comp_methods=SSL_COMP_get_compression_methods(); + /* No compression for DTLS */ + if (meth->version != DTLS1_VERSION) + ret->comp_methods=SSL_COMP_get_compression_methods(); #ifndef OPENSSL_NO_TLSEXT ret->tlsext_servername_callback = 0; -- 2.25.1