From 153b9abc3178ee6d8092ba08cafdd1a0b6d84059 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 14 Jan 2022 16:32:18 -0800 Subject: [PATCH] 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. --- src/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 32df93ed4..c61ea99a1 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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; }