---
title: "CMSDecoderCopySignerTimestampCertificates(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsdecodercopysignertimestampcertificates(_:_:_:)"
---

# CMSDecoderCopySignerTimestampCertificates(_:_:_:)

Returns an array containing the certificates from a timestamp response.

## Declaration

```swift
func CMSDecoderCopySignerTimestampCertificates(_ cmsDecoder: CMSDecoder, _ signerIndex: Int, _ certificateRefs: UnsafeMutablePointer<CFArray?>) -> OSStatus
```

## Parameters

- `cmsDecoder`: A CMSDecoder reference returned by the CMSDecoderCreate function.
- `signerIndex`: A number indicating which signer to examine. Signer index numbers start with 0. Use the doc://com.apple.security/documentation/Security/CMSDecoderGetNumSigners(_:_:) function to determine the total number of signers for a message.
- `certificateRefs`: The address of a Core Foundation array reference where the resulting array should be stored.

## Return Value

Return Value A result code. See Security Framework Result Codes. Typically, this function returns errSecParam if the CMS message was not signed or signerIndex is out of bounds, and returns errSecItemNotFound if no certificates were found.

## Discussion

Discussion The signature must contain an authenticated timestamp provided by a time stamping authority. Elements of the returned array are of type SecCertificateRef. The caller is responsible for releasing the returned array by calling CFRelease. You must call CMSDecoderFinalizeMessage(_:) before you call this function.
