From 1f1b1829c390e56c04e165c7522f0ddfb19b22c1 Mon Sep 17 00:00:00 2001 From: Hiroyuki YAMAMORI Date: Wed, 26 Aug 2015 15:06:22 +0100 Subject: Fix DTLS1.2 compression MIME-Version: 1.0 Content-Type: text/plain; charset=latin1 Content-Transfer-Encoding: 8bit Backport of equivalent fix from master. The only compression method is stateful and hence incompatible with DTLS. The DTLS test was not working for DTLS1.2 Reviewed-by: Emilia Käsper Reviewed-by: Matt Caswell --- ssl/ssl_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index c0931e7..d72756a 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1980,7 +1980,7 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) ret->extra_certs = NULL; /* No compression for DTLS */ - if (meth->version != DTLS1_VERSION) + if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)) ret->comp_methods = SSL_COMP_get_compression_methods(); ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH; -- 1.7.12.1