]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disable compression for DTLS.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 19 Mar 2013 13:46:28 +0000 (13:46 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 19 Mar 2013 13:48:02 +0000 (13:48 +0000)
The only standard compression method is stateful and is incompatible with
DTLS.
(cherry picked from commit e14b8410ca882da8e9579a2d928706f894c8e1ae)

ssl/ssl_lib.c

index 4714d89a4c4d6fe337e228db385ac0f222487b81..26fbe87fbf9c90f99611e009e1440792ea8e8c3d 100644 (file)
@@ -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;