diff options
author | Matt Caswell <matt@openssl.org> | 2017-11-23 10:37:51 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-12-04 13:31:48 +0000 |
commit | d4d2f3a4c14113c20eaa9350cbbf32cfb3e4f10c (patch) | |
tree | 0bbe5027ab1e7d4a9ea7db1b9f915128b70c5869 /ssl/tls13_enc.c | |
parent | 3ec8d113a59162a8ae9020d4f8a501ac2f33d744 (diff) |
Convert more functions in ssl/statem/statem.c to use SSLfatal()
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4778)
Diffstat (limited to 'ssl/tls13_enc.c')
-rw-r--r-- | ssl/tls13_enc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c index aa933b2a5d..fe817f8f65 100644 --- a/ssl/tls13_enc.c +++ b/ssl/tls13_enc.c @@ -242,8 +242,10 @@ size_t tls13_final_finish_mac(SSL *s, const char *str, size_t slen, EVP_PKEY *key = NULL; EVP_MD_CTX *ctx = EVP_MD_CTX_new(); - if (!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen)) + if (!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen)) { + /* SSLfatal() already called */ goto err; + } if (str == s->method->ssl3_enc->server_finished_label) key = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, @@ -256,8 +258,11 @@ size_t tls13_final_finish_mac(SSL *s, const char *str, size_t slen, || ctx == NULL || EVP_DigestSignInit(ctx, NULL, md, NULL, key) <= 0 || EVP_DigestSignUpdate(ctx, hash, hashlen) <= 0 - || EVP_DigestSignFinal(ctx, out, &hashlen) <= 0) + || EVP_DigestSignFinal(ctx, out, &hashlen) <= 0) { + SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS13_FINAL_FINISH_MAC, + ERR_R_INTERNAL_ERROR); goto err; + } ret = hashlen; err: |