Merge pull request #1664 from JacobBarthelmeh/Testing

keep length value after call to wc_BerToDer
This commit is contained in:
Eric Blankenhorn
2018-07-05 18:05:28 -05:00
committed by GitHub

View File

@ -4466,7 +4466,6 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg,
pkcs7->der = (byte*)XMALLOC(len, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
if (pkcs7->der == NULL)
return MEMORY_E;
len = 0;
ret = wc_BerToDer(pkiMsg, pkiMsgSz, pkcs7->der, &len);
if (ret < 0)
return ret;