diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index d35bc87715..778d3e70fb 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -24067,7 +24067,7 @@ int FillSigner(Signer* signer, DecodedCert* cert, int type, DerBuffer *der) if (ret == 0 && signer != NULL) { if (cert->extSapkiSet && cert->sapkiLen > 0) { /* Allocated space for alternative public key. */ - signer->sapkiDer = (byte*)XMALLOC(cert->sapkiLen, cm->heap, + signer->sapkiDer = (byte*)XMALLOC(cert->sapkiLen, cert->heap, DYNAMIC_TYPE_PUBLIC_KEY); if (signer->sapkiDer == NULL) { ret = MEMORY_E; @@ -24083,7 +24083,8 @@ int FillSigner(Signer* signer, DecodedCert* cert, int type, DerBuffer *der) #if defined(WOLFSSL_AKID_NAME) || defined(HAVE_CRL) if (ret == 0 && signer != NULL) - ret = CalcHashId(cert->serial, (word32)cert->serialSz, signer->serialHash); + ret = CalcHashId(cert->serial, (word32)cert->serialSz, + signer->serialHash); #endif if (ret == 0 && signer != NULL) { #ifdef WOLFSSL_SIGNER_DER_CERT