mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-07 11:50:48 +02:00
NULL check wolfSSL_get_cipher_name_by_hash arguments.
Thanks to Cal Page for the report.
This commit is contained in:
+9
-1
@@ -15147,7 +15147,15 @@ const char* wolfSSL_get_cipher_name_by_hash(WOLFSSL* ssl, const char* hash)
|
||||
const char* name = NULL;
|
||||
byte mac = no_mac;
|
||||
int i;
|
||||
const Suites* suites = WOLFSSL_SUITES(ssl);
|
||||
const Suites* suites;
|
||||
|
||||
if (hash == NULL || ssl == NULL ||
|
||||
(ssl->suites == NULL && ssl->ctx == NULL))
|
||||
return NULL;
|
||||
|
||||
suites = WOLFSSL_SUITES(ssl);
|
||||
if (suites == NULL)
|
||||
return NULL;
|
||||
|
||||
if (XSTRCMP(hash, "SHA256") == 0) {
|
||||
mac = sha256_mac;
|
||||
|
||||
Reference in New Issue
Block a user