mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user