summaryrefslogtreecommitdiff
path: root/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/t1_enc.c')
-rw-r--r--lib/libssl/t1_enc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c
index 25991220789..5f17a4a94a2 100644
--- a/lib/libssl/t1_enc.c
+++ b/lib/libssl/t1_enc.c
@@ -532,12 +532,19 @@ tls1_setup_key_block(SSL *s)
int mac_type = NID_undef, mac_secret_size = 0;
int ret = 0;
-
if (s->s3->tmp.key_block_length != 0)
return (1);
- if (!ssl_cipher_get_evp(s->session, &c, &hash, &mac_type, &mac_secret_size, &comp)) {
- SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK, SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
+ if (!ssl_cipher_get_comp(s->session, &comp)) {
+ SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,
+ SSL_R_CIPHER_COMPRESSION_UNAVAILABLE);
+ return (0);
+ }
+
+ if (!ssl_cipher_get_evp(s->session, &c, &hash, &mac_type,
+ &mac_secret_size)) {
+ SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,
+ SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
return (0);
}