CMSEncoderCopySupportingCerts(_:_:)
Obtains the certificates added to a message with CMSEncoderAddSupportingCerts.
Declaration
func CMSEncoderCopySupportingCerts(_ cmsEncoder: CMSEncoder, _ certsOut: UnsafeMutablePointer<CFArray?>) -> OSStatusParameters
- cmsEncoder:
The CMSEncoder reference returned by the
CMSEncoderCreatefunction. - certsOut:
On return, points to a CFArray of
SecCertificateRefobjects. You must use theCFReleasefunction to free this reference when you are finished using it.
Return Value
A result code. See Security Framework Result Codes.
Discussion
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 obtain any such certificates added with the CMSEncoderAddSupportingCerts function. If CMSEncoderAddSupportingCerts has not been called, this function returns a NULL value for certsOut. Note that this function does not return the signing certificates, if any.