---
title: "CMSEncoderCopySigners(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsencodercopysigners(_:_:)"
---

# CMSEncoderCopySigners(_:_:)

Obtains the array of signers specified with the CMSEncoderAddSigners function.

## Declaration

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

## Parameters

- `cmsEncoder`: The CMSEncoder reference returned by the doc://com.apple.security/documentation/Security/CMSEncoderCreate(_:) function.
- `signersOut`: On return, points to an array of identity objects of type doc://com.apple.security/documentation/Security/SecIdentity of the signers of the message. If the doc://com.apple.security/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

Return Value A result code. See Security Framework Result Codes.

## See Also

### Related Documentation

- [CMSEncoderCreate(_:)](security/cmsencodercreate(_:).md)
- [CMSEncoderAddSigners(_:_:)](security/cmsencoderaddsigners(_:_:).md)
