mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
RSA PSS Fix
1. Change the utility function in wc_encrypt that returns the size of a hash to initialize the size to HASH_TYPE_E, like the other utility functions. 2. When getting the hash size returns an error, RSA-PSS verify inline should return a BAD_FUNC_ARG error.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user