mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
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@oracle.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13000)
This commit is contained in:
parent
8c27ee6e05
commit
d93bded6aa
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user