PKCS7_DecodeEnvelopedData, RsaPrivateDecryptInline can return 0 upon error

This commit is contained in:
Chris Conlon 2014-01-22 15:26:43 -07:00
parent 38c2373c4f
commit 9f8dcccc61

View File

@ -1183,7 +1183,7 @@ CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg,
/* decrypt encryptedKey */ /* decrypt encryptedKey */
keySz = RsaPrivateDecryptInline(encryptedKey, encryptedKeySz, keySz = RsaPrivateDecryptInline(encryptedKey, encryptedKeySz,
&decryptedKey, &privKey); &decryptedKey, &privKey);
if (keySz < 0) if (keySz <= 0)
return keySz; return keySz;
/* decrypt encryptedContent */ /* decrypt encryptedContent */