diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index faa403173..a77a32099 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -3472,7 +3472,7 @@ int wc_RsaPSS_VerifyCheckInline(byte* in, word32 inLen, byte** out, hLen = wc_HashGetDigestSize(hash); if (hLen < 0) - return hLen; + return BAD_FUNC_ARG; if ((word32)hLen != digestLen) return BAD_FUNC_ARG; diff --git a/wolfcrypt/src/wc_encrypt.c b/wolfcrypt/src/wc_encrypt.c index 39dbeec5a..7afc032b5 100644 --- a/wolfcrypt/src/wc_encrypt.c +++ b/wolfcrypt/src/wc_encrypt.c @@ -374,7 +374,7 @@ int wc_CryptKey(const char* password, int passwordSz, byte* salt, int saltSz, int iterations, int id, byte* input, int length, int version, byte* cbcIv, int enc, int shaOid) { - int typeH; + int typeH = WC_HASH_TYPE_NONE; int derivedLen = 0; int ret = 0; #ifdef WOLFSSL_SMALL_STACK