Adds certificates to a message.
- macOS 10.5+
The CMSEncoder reference returned by the
Either a single certificate, specified as a certificate object (type
Sec), or a set of certificates specified as a
CFArrayof certificate objects.
A result code. See Security Framework Result Codes.
A CMS message can contain arbitrary sets of certificates other than or in addition to those indicating the identity of signers. You can use this function to add such certificates to a message. It is not necessary to call this function for a normal signed message. When you create a signed message, Cryptographic Message Services automatically adds the signer certificates and any intermediate certificates needed to verify the signers.
You can use this function even if you don’t sign or encrypt the message, in order to transport one or more certificates. To do so, call
CMSEncoder to obtain a
CMSEncoder reference, call
CMSEncoder one or more times, and then call
CMSEncoder to complete the message. No additional content need be specified.
If you do add content to the message in addition to the certificates, you must call this function before the first call to the