<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/CMSEncoderCopySigners(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@CMSEncoderCopySigners"
  },
  "title" : "CMSEncoderCopySigners(_:_:)"
}
-->

# CMSEncoderCopySigners(_:_:)

Obtains the array of signers specified with the `CMSEncoderAddSigners` function.

```
func CMSEncoderCopySigners(_ cmsEncoder: CMSEncoder, _ signersOut: UnsafeMutablePointer<CFArray?>) -> OSStatus
```

## Parameters

`cmsEncoder`

The CMSEncoder reference returned by the [`CMSEncoderCreate(_:)`](/documentation/Security/CMSEncoderCreate(_:)) function.

`signersOut`

On return, points to an array of identity objects of type [`SecIdentity`](/documentation/Security/SecIdentity) of the signers of the message. If the [`CMSEncoderAddSigners(_:_:)`](/documentation/Security/CMSEncoderAddSigners(_:_:)) function has not been called for this message, this function returns a `NULL` array. You must use the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function to free this reference when you are finished using it.

## Return Value

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes).

## See Also

[`CMSEncoderCreate(_:)`](/documentation/Security/CMSEncoderCreate(_:))

Creates a CMSEncoder reference.

[`CMSEncoderAddSigners(_:_:)`](/documentation/Security/CMSEncoderAddSigners(_:_:))

Specifies signers of the message.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)