CL_CertGroupToSignedBundle
CSSM_DATA_PTR CSSMCLI CL_CertGroupToSignedBundle
(CSSM_CL_HANDLE CLHandle,
CSSM_CC_HANDLE CCHandle,
const CSSM_CERTGROUP_PTR CertGroupToBundle,
const CSSM_DATA_PTR SignerCert,
const CSSM_CERT_BUNDLE_HEADER_PTR BundleInfo);
This function accepts as input a certificate group (as an array of individual certificates) and returns a certificate bundle (a codified and signed aggregation of the certificates in the group). The certificate group will first be encoded according to the BundleInfo input by the user. If BundleInfo is NULL, the library will perform a default encoding for its default bundle type. If possible, the certificate group ordering will be maintained in this certificate aggregate encoding. After encoding, the certificate aggregate will be signed using the input context and signer certificate. The CL module embeds knowledge of the signing scope for the bundle types it supports. The signature is then associated with the certificate aggregate according to the bundle type and encoding rules and is returned as a bundle to the calling application.
- CLHandle (input)
The handle of the add-in module to perform this operation.
- CCHandle (input)
The handle of the cryptographic context to control the signing operation. The operation will fail if a signature is required for this type of bundle and the cryptographic context is not valid.
- CertGroupToBundle (input)
An array of individual, encoded certificates. All of the certificates in this list will be included in the resulting certificate bundle.
- SignerCert (input/optional)
If signing is required for this type of certificate bundle, this is the certificate to be used to sign the bundle. If a signing certificate is required but not specified, then the module will assume a default certificate. If a signature is not required for this certificate bundle type, this parameter will be ignored.
- BundleInfo (input/optional)
A structure containing the type and encoding of the bundle to be created. If the type and the encoding are not specified, then the module will assume a default bundle type and bundle encoding.
The function returns a pointer to a signed certificate bundle containing all of the certificates in the certificate group. The bundle is of the type and encoding requested by the caller or is the default defined by the library module if the BundleInfo was not specified by the caller. If the pointer is NULL, an error has occurred. Use CSSM_GetError to obtain the error code.
- CSSM_CL_INVALID_CL_HANDLE
Invalid Certificate Library Handle.
- CSSM_CL_INVALID_CC_HANDLE
Invalid context handle.
- CSSM_CL_INVALID_BUNDLE_INFO
Unknown bundle type or encoding.
- CSSM_CL_INVALID_SIGNER_CERTIFICATE
Revoked or expired signer certificate.
- CSSM_CL_MEMORY_ERROR
Error allocating memory.
- CSSM_CL_CERGROUPTOBUNDLE_FAIL
Unable to create the signed bundle.
CL_CertGroupFromVerifiedBundle
Contents | Next section | Index |