diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c index 2b26829e4b..c80dd63631 100644 --- a/ssl/record/methods/tls_common.c +++ b/ssl/record/methods/tls_common.c @@ -91,17 +91,19 @@ char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx) } } +#ifndef OPENSSL_NO_COMP static int rlayer_allow_compression(OSSL_RECORD_LAYER *rl) { if (rl->options & SSL_OP_NO_COMPRESSION) return 0; -#if 0 +# if 0 /* TODO(RECLAYER): Implement ssl_security inside the record layer */ return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL); -#else +# else return 1; -#endif +# endif } +#endif static int rlayer_setup_read_buffer(OSSL_RECORD_LAYER *rl) { @@ -1198,7 +1200,9 @@ static void tls_int_free(OSSL_RECORD_LAYER *rl) EVP_CIPHER_CTX_free(rl->enc_read_ctx); EVP_MD_CTX_free(rl->read_hash); +#ifndef OPENSSL_NO_COMP COMP_CTX_free(rl->expand); +#endif OPENSSL_free(rl); } diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 1135392a84..bfff734a4f 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -94,9 +94,7 @@ int ssl3_change_cipher_state(SSL_CONNECTION *s, int which) unsigned char *key, *iv; EVP_CIPHER_CTX *dd; const EVP_CIPHER *ciph; -#ifndef OPENSSL_NO_COMP - const SSL_COMP *comp; -#endif + const SSL_COMP *comp = NULL; const EVP_MD *md; int mdi; size_t n, iv_len, key_len; diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 9d3827adbc..b7adc9daff 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -156,9 +156,7 @@ int tls1_change_cipher_state(SSL_CONNECTION *s, int which) unsigned char *key, *iv; EVP_CIPHER_CTX *dd; const EVP_CIPHER *c; -#ifndef OPENSSL_NO_COMP - const SSL_COMP *comp; -#endif + const SSL_COMP *comp = NULL; const EVP_MD *m; int mac_type; size_t mac_secret_size;