CMSEncoderSetCertificateChainMode(_:_:)
Specifies which certificates to include in a signed CMS message.
Declaration
func CMSEncoderSetCertificateChainMode(_ cmsEncoder: CMSEncoder, _ chainMode: CMSCertificateChainMode) -> OSStatusParameters
- cmsEncoder:
The CMSEncoder reference returned by the
CMSEncoderCreatefunction. - chainMode:
A constant that indicates which certificate or certificates to include in the message. See Cmscertificatechainmode.
Return Value
A result code. See Security Framework Result Codes.
Discussion
This function is used only for signed messages and is optional. If you don’t call this function, the default, kCMSCertificateChain, is used. In this case the message includes the signer certificate plus all certificates needed to verify the signer certificate, up to but not including the root certificate.
If you do call this function, you must call it before the first call to the CMSEncoderUpdateContent function.