From 9f8dcccc610ef7e9ff521c49b0414d27ae8f9ea1 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 22 Jan 2014 15:26:43 -0700 Subject: [PATCH] PKCS7_DecodeEnvelopedData, RsaPrivateDecryptInline can return 0 upon error --- ctaocrypt/src/pkcs7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctaocrypt/src/pkcs7.c b/ctaocrypt/src/pkcs7.c index edf986c30..8db8c5f97 100644 --- a/ctaocrypt/src/pkcs7.c +++ b/ctaocrypt/src/pkcs7.c @@ -1183,7 +1183,7 @@ CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg, /* decrypt encryptedKey */ keySz = RsaPrivateDecryptInline(encryptedKey, encryptedKeySz, &decryptedKey, &privKey); - if (keySz < 0) + if (keySz <= 0) return keySz; /* decrypt encryptedContent */