Merge pull request #3186 from SparkiDev/rsa_pss_oob

RSA PSS check input length is hash length
This commit is contained in:
toddouska
2020-08-03 16:41:15 -07:00
committed by GitHub

View File

@@ -1121,6 +1121,9 @@ static int RsaPad_PSS(const byte* input, word32 inputLen, byte* pkcsBlock,
hLen = wc_HashGetDigestSize(hType);
if (hLen < 0)
return hLen;
if ((int)inputLen != hLen) {
return BAD_FUNC_ARG;
}
hiBits = (bits - 1) & 0x7;
if (hiBits == 0) {