Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)
}
}
+#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)
{
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);
}
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;
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;