From: Matt Caswell <matt@openssl.org>
Date: Mon, 14 Jan 2019 16:37:14 +0000 (+0000)
Subject: Don't get the mac type in TLSv1.3
X-Git-Tag: OpenSSL_1_1_1b~81
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0c13c8ece1fd88acf757e385bbc865e1e94382ed;p=oweals%2Fopenssl.git

Don't get the mac type in TLSv1.3

We don't use this information so we shouldn't fetch it. As noted in the
comments in #8005.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/8020)

(cherry picked from commit ea09abc80892920ee5db4de82bed7a193b5896f0)
---

diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index e36b7d3a06..d66356681b 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -323,11 +323,9 @@ int tls13_setup_key_block(SSL *s)
 {
     const EVP_CIPHER *c;
     const EVP_MD *hash;
-    int mac_type = NID_undef;
 
     s->session->cipher = s->s3->tmp.new_cipher;
-    if (!ssl_cipher_get_evp
-        (s->session, &c, &hash, &mac_type, NULL, NULL, 0)) {
+    if (!ssl_cipher_get_evp(s->session, &c, &hash, NULL, NULL, NULL, 0)) {
         SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS13_SETUP_KEY_BLOCK,
                  SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
         return 0;