---
title: "CMSEncoderGetCertificateChainMode(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsencodergetcertificatechainmode(_:_:)"
---

# CMSEncoderGetCertificateChainMode(_:_:)

Obtains a constant that indicates which certificates are to be included in a signed CMS message.

## Declaration

```swift
func CMSEncoderGetCertificateChainMode(_ cmsEncoder: CMSEncoder, _ chainModeOut: UnsafeMutablePointer<CMSCertificateChainMode>) -> OSStatus
```

## Parameters

- `cmsEncoder`: The CMSEncoder reference returned by the CMSEncoderCreate function.
- `chainModeOut`: On return, a constant that indicates which certificate or certificates are to be included in the message. See doc://com.apple.security/documentation/Security/CMSCertificateChainMode.

## Return Value

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

## See Also

### Related Documentation

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