diff --git a/src/ssl.c b/src/ssl.c index 2bcd1788d..27aed82a7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -18299,10 +18299,11 @@ size_t wolfSSL_get_client_random(const WOLFSSL* ssl, unsigned char* out, #endif #endif #ifndef NO_SHA - if (XSTRCMP(evp_md, "SHA") == 0) { + if (XSTRCMP(evp_md, "SHA") == 0 || XSTRCMP(evp_md, "SHA1") == 0) { type = WC_SHA; mdlen = WC_SHA_DIGEST_SIZE; - } else + } + else #endif { return NULL; diff --git a/tests/api.c b/tests/api.c index dd40f5d84..894cd6dc6 100644 --- a/tests/api.c +++ b/tests/api.c @@ -39202,6 +39202,9 @@ static int test_wolfSSL_HMAC(void) test_openssl_hmac(EVP_sha3_512(), (int)WC_SHA3_512_DIGEST_SIZE); #endif #endif + #ifndef NO_SHA + test_openssl_hmac(EVP_sha1(), (int)WC_SHA_DIGEST_SIZE); + #endif printf(resultFmt, passed); #endif