---
title: "SecTrustSettingsCopyModificationDate(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sectrustsettingscopymodificationdate(_:_:_:)"
---

# SecTrustSettingsCopyModificationDate(_:_:_:)

Obtains the date and time at which a certificate’s trust settings were last modified.

## Declaration

```swift
func SecTrustSettingsCopyModificationDate(_ certRef: SecCertificate, _ domain: SecTrustSettingsDomain, _ modificationDate: UnsafeMutablePointer<CFDate?>) -> OSStatus
```

## Parameters

- `certRef`: The certificate for which you wish to obtain the modification time. Pass the value kSecTrustSettingsDefaultRootCertSetting to obtain the modification time for the default root certificate trust settings for the domain.
- `domain`: The trust settings domain of the trust settings for which you wish to obtain the modification time (it’s possible for a single certificate to have trust settings in more than one domain). For possible values, see doc://com.apple.security/documentation/Security/SecTrustSettingsDomain.
- `modificationDate`: On return, the date and time at which the certificate’s trust settings were last modified. In Objective-C, call the doc://com.apple.documentation/documentation/CoreFoundation/CFRelease function to release this object when you are finished with it.

## Return Value

Return Value A result code. See Security Framework Result Codes. Returns errSecItemNotFound if no trust settings exist for the specified certificate and domain.
