forked from wolfSSL/wolfssl
Merge pull request #2148 from cconlon/pkcs7nullparam
add NULL param in CMS KARI OriginatorPublicKey parameters
This commit is contained in:
@ -5180,8 +5180,11 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
|
|||||||
origPubKeyStr + 1) + 2;
|
origPubKeyStr + 1) + 2;
|
||||||
totalSz += (origPubKeyStrSz + kari->senderKeyExportSz);
|
totalSz += (origPubKeyStrSz + kari->senderKeyExportSz);
|
||||||
|
|
||||||
/* Originator AlgorithmIdentifier */
|
/* Originator AlgorithmIdentifier, params set to NULL for interop
|
||||||
origAlgIdSz = SetAlgoID(ECDSAk, origAlgId, oidKeyType, 0);
|
compatibility */
|
||||||
|
origAlgIdSz = SetAlgoID(ECDSAk, origAlgId, oidKeyType, 2);
|
||||||
|
origAlgId[origAlgIdSz++] = ASN_TAG_NULL;
|
||||||
|
origAlgId[origAlgIdSz++] = 0;
|
||||||
totalSz += origAlgIdSz;
|
totalSz += origAlgIdSz;
|
||||||
|
|
||||||
/* outer OriginatorPublicKey IMPLICIT [1] */
|
/* outer OriginatorPublicKey IMPLICIT [1] */
|
||||||
@ -5225,8 +5228,11 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
|
|||||||
idx += origIdOrKeySeqSz;
|
idx += origIdOrKeySeqSz;
|
||||||
XMEMCPY(recip->recip + idx, origPubKeySeq, origPubKeySeqSz);
|
XMEMCPY(recip->recip + idx, origPubKeySeq, origPubKeySeqSz);
|
||||||
idx += origPubKeySeqSz;
|
idx += origPubKeySeqSz;
|
||||||
|
|
||||||
|
/* AlgorithmIdentifier with NULL parameter */
|
||||||
XMEMCPY(recip->recip + idx, origAlgId, origAlgIdSz);
|
XMEMCPY(recip->recip + idx, origAlgId, origAlgIdSz);
|
||||||
idx += origAlgIdSz;
|
idx += origAlgIdSz;
|
||||||
|
|
||||||
XMEMCPY(recip->recip + idx, origPubKeyStr, origPubKeyStrSz);
|
XMEMCPY(recip->recip + idx, origPubKeyStr, origPubKeyStrSz);
|
||||||
idx += origPubKeyStrSz;
|
idx += origPubKeyStrSz;
|
||||||
/* ephemeral public key */
|
/* ephemeral public key */
|
||||||
|
Reference in New Issue
Block a user