---
title: "CMSEncoderAddSigners(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsencoderaddsigners(_:_:)"
---

# CMSEncoderAddSigners(_:_:)

Specifies signers of the message.

## Declaration

```swift
func CMSEncoderAddSigners(_ cmsEncoder: CMSEncoder, _ signerOrArray: CFTypeRef) -> OSStatus
```

## Parameters

- `cmsEncoder`: The CMSEncoder reference returned by the CMSEncoderCreate function.
- `signerOrArray`: The identity object for the identity of one signer, specified as type SecIdentityRef, or a CFArray of identity objects of typeSecIdentityRef.

## Return Value

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

## Discussion

Discussion Call this function only if the message is to be signed. You can call this function more than once for the same message. If you do call this function, you must call it before the first call to the CMSEncoderUpdateContent(_:_:_:) function.

## See Also

### Related Documentation

- [CMSEncoderUpdateContent(_:_:_:)](security/cmsencoderupdatecontent(_:_:_:).md)
- [CMSEncoderCopySigners(_:_:)](security/cmsencodercopysigners(_:_:).md)
- [CMSEncoderCreate(_:)](security/cmsencodercreate(_:).md)
- [CMSDecoderCopySignerStatus(_:_:_:_:_:_:_:)](security/cmsdecodercopysignerstatus(_:_:_:_:_:_:_:).md)
