85 "authentication", 14 );
97 status = addAction( &envelopeInfoPtr->actionList,
98 envelopeInfoPtr->memPoolState, actionType,
117 REQUIRES( envelopeInfoPtr->actionList == NULL );
119 switch( envelopeInfoPtr->usage )
126 return( createActionContext( envelopeInfoPtr,
ACTION_CRYPT,
127 envelopeInfoPtr->defaultAlgo,
134 status = createActionContext( envelopeInfoPtr,
ACTION_xxx,
135 CRYPT_IALGO_GENERIC_SECRET,
139 actionListPtr =
findAction( envelopeInfoPtr->actionList,
142 status = createActionContext( envelopeInfoPtr,
ACTION_CRYPT,
143 envelopeInfoPtr->defaultAlgo,
146 status = createActionContext( envelopeInfoPtr,
ACTION_MAC,
147 envelopeInfoPtr->defaultMAC,
152 return( createActionContext( envelopeInfoPtr,
ACTION_MAC,
153 envelopeInfoPtr->defaultMAC,
171 ACTION_LIST *actionListPtr = envelopeInfoPtr->actionList;
177 REQUIRES( preActionListPtr != NULL && \
215 status = iCryptExportKey( NULL, 0, &preActionListPtr->encodedSize,
219 preActionListPtr->iCryptHandle );
232 return( (
isDlpAlgo( keyexAlgorithm ) || \
244 int totalSize, iterationCount,
status;
252 if( envelopeInfoPtr->preActionList == NULL )
256 if( envelopeInfoPtr->actionList == NULL )
258 status = createEnvelopeContexts( envelopeInfoPtr );
275 REQUIRES( envelopeInfoPtr->actionList->next == NULL );
282 REQUIRES( envelopeInfoPtr->actionList != NULL );
294 REQUIRES( envelopeInfoPtr->actionList->next == NULL );
298 &envelopeInfoPtr->actionList->iCryptHandle,
307 for( actionListPtr = envelopeInfoPtr->preActionList, iterationCount = 0;
309 actionListPtr = actionListPtr->
next, iterationCount++ )
311 status = processKeyexchangeAction( envelopeInfoPtr, actionListPtr,
319 hasIndefSizeActions =
TRUE;
324 envelopeInfoPtr->cryptActionSize = hasIndefSizeActions ? \
325 CRYPT_UNUSED : totalSize;
327 ( envelopeInfoPtr->cryptActionSize > 0 && \
353 int cmsInitSigParams(
const ACTION_LIST *actionListPtr,
359 int useDefaultAttributes,
status;
378 sigParams->iTspSession = actionListPtr->
iTspSession;
383 sigParams->iAuthAttr = signingAttributes;
393 &useDefaultAttributes,
397 if( useDefaultAttributes )
398 sigParams->useDefaultAuthAttr =
TRUE;
424 &actionListPtr->iCryptHandle,
425 CRYPT_IATTRIBUTE_CERTCOLLECTION );
446 actionListPtr->iExtraData = createInfo.
cryptHandle;
470 contentType = envelopeInfoPtr->contentType;
488 REQUIRES( actionListPtr != NULL && \
490 actionListPtr->associatedAction != NULL );
497 status = processSigningCerts( envelopeInfoPtr, actionListPtr );
504 status = cmsInitSigParams( actionListPtr, envelopeInfoPtr->type,
505 envelopeInfoPtr->ownerHandle,
511 status = iCryptCreateSignature( NULL, 0, &signatureSize,
512 envelopeInfoPtr->type, actionListPtr->iCryptHandle,
513 actionListPtr->associatedAction->iCryptHandle,
535 actionListPtr->encodedSize = signatureSize;
536 envelopeInfoPtr->signActionSize += signatureSize;
541 ( envelopeInfoPtr->signActionSize > 0 && \
550 ACTION_LIST *actionListPtr = envelopeInfoPtr->postActionList;
551 int iterationCount,
status;
556 REQUIRES( actionListPtr != NULL && \
562 envelopeInfoPtr->payloadSize = 0;
575 if( envelopeInfoPtr->payloadSize > 0 )
590 if( actionListPtr->
next != NULL )
604 envelopeInfoPtr->iExtraCertChain = createInfo.
cryptHandle;
615 CRYPT_ICERTFORMAT_CERTSET );
618 envelopeInfoPtr->extraDataSize = msgData.
length;
623 for( actionListPtr = envelopeInfoPtr->postActionList, iterationCount = 0;
625 actionListPtr = actionListPtr->
next, iterationCount++ )
627 status = processSignatureAction( envelopeInfoPtr, actionListPtr );
636 if( envelopeInfoPtr->iExtraCertChain !=
CRYPT_ERROR )
643 CRYPT_ICERTFORMAT_CERTSET );
646 envelopeInfoPtr->extraDataSize = msgData.
length;
648 ENSURES( envelopeInfoPtr->extraDataSize >= 0 && \