]> granicus.if.org Git - openssl/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:46:57 +0000 (13:46 +0000)
The only standard compression method is stateful and is incompatible with
DTLS.

ssl/ssl_lib.c

index f9907130c69b398bd7f23fcb3a1b5c93eed0c8d7..b27743f95cad89c8b557683542589717c4c0bbc7 100644 (file)
@@ -1865,7 +1865,9 @@ SSL_CTX *SSL_CTX_new(const 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();
 
        ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;