[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Andy Polyakov appro at openssl.org
Wed Oct 17 11:59:23 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  a76a41655e57b72b30a373aae6e75afedf920076 (commit)
      from  77078e6bbfa686dba00cf379f0c96bd2833133a6 (commit)


- Log -----------------------------------------------------------------
commit a76a41655e57b72b30a373aae6e75afedf920076
Author: Andy Polyakov <appro at openssl.org>
Date:   Fri Oct 12 22:17:51 2018 +0200

    ssl/s3_enc.c: fix logical errors in ssl3_final_finish_mac.
    
    (back-port of commit 7d0effeacbb50b12bfc24df7614d7cf5c8686f51)
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/7392)

-----------------------------------------------------------------------

Summary of changes:
 ssl/s3_enc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index e08857d..89b7739 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -404,13 +404,14 @@ int ssl3_final_finish_mac(SSL *s, const char *sender, int len, unsigned char *p)
     }
     if (!EVP_MD_CTX_copy_ex(ctx, s->s3->handshake_dgst)) {
         SSLerr(SSL_F_SSL3_FINAL_FINISH_MAC, ERR_R_INTERNAL_ERROR);
-        return 0;
+        ret = 0;
+        goto err;
     }
 
     ret = EVP_MD_CTX_size(ctx);
     if (ret < 0) {
-        EVP_MD_CTX_reset(ctx);
-        return 0;
+        ret = 0;
+        goto err;
     }
 
     if ((sender != NULL && EVP_DigestUpdate(ctx, sender, len) <= 0)
@@ -422,6 +423,7 @@ int ssl3_final_finish_mac(SSL *s, const char *sender, int len, unsigned char *p)
         ret = 0;
     }
 
+ err:
     EVP_MD_CTX_free(ctx);
 
     return ret;


More information about the openssl-commits mailing list