---
title: "CMSEncoderCopySignerTimestamp(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsencodercopysignertimestamp(_:_:_:)"
---

# CMSEncoderCopySignerTimestamp(_:_:_:)

Returns the timestamp of a signer of a CMS message, if present.

## Declaration

```swift
func CMSEncoderCopySignerTimestamp(_ cmsEncoder: CMSEncoder, _ signerIndex: Int, _ timestamp: UnsafeMutablePointer<CFAbsoluteTime>) -> OSStatus
```

## Parameters

- `cmsEncoder`: A CMSEncoder reference returned by the CMSEncoderCreate 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.
- `timestamp`: The address of an absolute time value where the result 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 if signerIndex is out of bounds.

## Discussion

Discussion This timestamp is an authenticated timestamp provided by a time stamping authority. You must call CMSDecoderFinalizeMessage(_:) before you call this function.
