[openssl] master update
kaduk at mit.edu
kaduk at mit.edu
Thu Oct 29 20:24:20 UTC 2020
The branch master has been updated
via 231849bc9ca69dfd3adf40821421d8e2d804d8e8 (commit)
from fcf6e9d056162d5af64c6f7209388a5c3be2ce57 (commit)
- Log -----------------------------------------------------------------
commit 231849bc9ca69dfd3adf40821421d8e2d804d8e8
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Sun Sep 27 15:01:12 2020 -0700
Unify ssl3_get_cipher_by_std_name() implementation
The handling for the SCSVs was the same as for regular ciphers;
just merge them into the same table-driven handler.
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13010)
-----------------------------------------------------------------------
Summary of changes:
ssl/s3_lib.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 1fd424a52e..073fae49b0 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4122,9 +4122,10 @@ const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id)
const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
{
- SSL_CIPHER *c = NULL, *tbl;
- SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers};
- size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS};
+ SSL_CIPHER *tbl;
+ SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers, ssl3_scsvs};
+ size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS,
+ SSL3_NUM_SCSVS};
/* this is not efficient, necessary to optimize this? */
for (j = 0; j < OSSL_NELEM(alltabs); j++) {
@@ -4136,16 +4137,7 @@ const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
}
}
}
- if (c == NULL) {
- tbl = ssl3_scsvs;
- for (i = 0; i < SSL3_NUM_SCSVS; i++, tbl++) {
- if (strcmp(stdname, tbl->stdname) == 0) {
- c = tbl;
- break;
- }
- }
- }
- return c;
+ return NULL;
}
/*
More information about the openssl-commits
mailing list