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

# CMSDecoderCopySignerTimestampCertificates(_:_:_:)

Returns an array containing the certificates from a timestamp response.

```
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 [`CMSDecoderGetNumSigners(_:_:)`](/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

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes). Typically, this function returns [`errSecParam`](/documentation/Security/errSecParam) if the CMS message was not signed or `signerIndex` is out of bounds, and returns [`errSecItemNotFound`](/documentation/Security/errSecItemNotFound) if no certificates were found.

## 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(_:)`](/documentation/Security/CMSDecoderFinalizeMessage(_:)) before you call this function.

---

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)