Old Compiler Warning Cleanup (GCC 4.0.2)

ssl.c: Fix a couple of checks on hashType enum that were using a `< 0`
for the lower bound on an unsigned.
This commit is contained in:
John Safranek
2022-01-14 16:32:18 -08:00
parent f81e15f342
commit 153b9abc31

View File

@ -41339,7 +41339,7 @@ int wolfSSL_RSA_padding_add_PKCS1_PSS(WOLFSSL_RSA *rsa, unsigned char *EM,
}
hashType = wolfSSL_EVP_md2macType(hashAlg);
if (hashType < WC_HASH_TYPE_NONE || hashType > WC_HASH_TYPE_MAX) {
if (hashType > WC_HASH_TYPE_MAX) {
WOLFSSL_MSG("wolfSSL_EVP_md2macType error");
goto cleanup;
}
@ -41446,7 +41446,7 @@ int wolfSSL_RSA_verify_PKCS1_PSS(WOLFSSL_RSA *rsa, const unsigned char *mHash,
}
hashType = wolfSSL_EVP_md2macType(hashAlg);
if (hashType < WC_HASH_TYPE_NONE || hashType > WC_HASH_TYPE_MAX) {
if (hashType > WC_HASH_TYPE_MAX) {
WOLFSSL_MSG("wolfSSL_EVP_md2macType error");
return WOLFSSL_FAILURE;
}