Fix some no-comp compilation failures

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)
This commit is contained in:
Matt Caswell 2022-05-18 14:30:24 +01:00
parent 359affdead
commit 976b263d0a
3 changed files with 9 additions and 9 deletions

View File

@ -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);
}

View File

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

View File

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