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

# CMSDecoderCopySignerTimestampWithPolicy(_:_:_:_:)

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

```
func CMSDecoderCopySignerTimestampWithPolicy(_ cmsDecoder: CMSDecoder, _ timeStampPolicy: CFTypeRef?, _ signerIndex: Int, _ timestamp: UnsafeMutablePointer<CFAbsoluteTime>) -> OSStatus
```

## Parameters

`cmsDecoder`

A CMSDecoder reference returned by the [`CMSDecoderCreate(_:)`](/documentation/Security/CMSDecoderCreate(_:)) function.

`timeStampPolicy`

A timestamp policy. Specify `NULL` (or use the [`CMSDecoderCopySignerTimestamp(_:_:_:)`](/documentation/Security/CMSDecoderCopySignerTimestamp(_:_:_:)) function instead) to get the default, which is a policy using [`kSecPolicyAppleTimeStamping`](/documentation/Security/kSecPolicyAppleTimeStamping). See [Policies](/documentation/Security/policies) in [Certificate, Key, and Trust Services](/documentation/Security/certificate-key-and-trust-services) for more about policies.

`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.

`timestamp`

The address of an absolute time value where the result should be stored.

## Return Value

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes).

## Discussion

---

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)