forked from wolfSSL/wolfssl
Fixes from review
This commit is contained in:
@@ -768,10 +768,11 @@ int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz)
|
||||
byte ar[MAX_LENGTH_SZ + 2];
|
||||
tmpSz = SetShortInt(ar, &tmpIdx, mac->itt, MAX_LENGTH_SZ + 2);
|
||||
if (tmpSz < 0) {
|
||||
WOLFSSL_MSG("Error returned by SetShortInt");
|
||||
return tmpSz;
|
||||
ret = tmpSz;
|
||||
}
|
||||
else {
|
||||
XMEMCPY(&sdBuf[idx], ar, tmpSz);
|
||||
}
|
||||
XMEMCPY(&sdBuf[idx], ar, tmpSz);
|
||||
}
|
||||
|
||||
totalSz += sdBufSz;
|
||||
|
@@ -3504,6 +3504,9 @@ static int wc_PKCS7_VerifyContentMessageDigest(PKCS7* pkcs7,
|
||||
digestSz = wc_HashGetDigestSize(hashType);
|
||||
if (digestSz < 0) {
|
||||
WOLFSSL_MSG("Invalid hash type");
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(digest, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
return digestSz;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user