Disable compression for DTLS.

The only standard compression method is stateful and is incompatible with
DTLS.
This commit is contained in:
Dr. Stephen Henson 2013-03-19 13:43:06 +00:00
parent eb7ece1381
commit 2f0275a4c3

View 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->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;