[openssl] master update

beldmit at gmail.com beldmit at gmail.com
Sun Sep 27 18:10:39 UTC 2020


The branch master has been updated
       via  d93bded6aa2852e681de2ed76fb43c415687af68 (commit)
      from  8c27ee6e056257ab872598bb2a410b23f6c411a0 (commit)


- Log -----------------------------------------------------------------
commit d93bded6aa2852e681de2ed76fb43c415687af68
Author: hklaas <71921312+hklaas at users.noreply.github.com>
Date:   Sat Sep 26 10:54:13 2020 +0100

    optimise ssl3_get_cipher_by_std_name()
    
    Return immediately on matched cipher. Without this patch the code only breaks out of the inner for loop, meaning for a matched TLS13 cipher the code will still loop through 160ish SSL3 ciphers.
    
    CLA: trivial
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    (Merged from https://github.com/openssl/openssl/pull/13000)

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

Summary of changes:
 ssl/s3_lib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 88bab0edc4..94c2d8c2ce 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4132,8 +4132,7 @@ const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
             if (tbl->stdname == NULL)
                 continue;
             if (strcmp(stdname, tbl->stdname) == 0) {
-                c = tbl;
-                break;
+                return tbl;
             }
         }
     }


More information about the openssl-commits mailing list