Function

SecTrustSetVerifyDate

Sets the date and time against which the certificates in a trust management object are verified.

Declaration

OSStatus SecTrustSetVerifyDate(SecTrustRef trust, CFDateRef verifyDate);

Parameters

trust

The trust management object whose verification date you want to set. A trust management object includes one or more certificates plus the policy or policies to be used in evaluating trust. Use the SecTrustCreateWithCertificates function to create a trust management object.

verifyDate

The date and time to use when verifying the certificate.

Return Value

Discussion

By default, the SecTrustEvaluateWithError function uses the current date and time when verifying a certificate. However, you can use SecTrustSetVerifyDate to set another date and time to use when verifying a certificate. For example, you can determine whether the certificate was valid when the document was signed rather than whether it’s valid at the present time.

It is safe to call this function concurrently on two or more threads as long as it is not used to change the value of a trust management object that is simultaneously being used by another function. For example, you cannot call this function on one thread at the same time as you are calling the evaluation function for the same trust management object on another thread, but you can call this function and simultaneously evaluate a different trust management object on another thread. Similarly, calls to functions that return information about a trust management object (such as the SecTrustCopyCustomAnchorCertificates function) may fail or return an unexpected result if this function is simultaneously changing the same trust management object on another thread.

See Also

Advanced Trust Configuation

Configuring a Trust

Work around a recoverable trust failure.

SecTrustSetAnchorCertificates

Sets the anchor certificates used when evaluating a trust management object.

SecTrustSetAnchorCertificatesOnly

Reenables trusting built-in anchor certificates.

SecTrustSetExceptions

Sets a list of exceptions that should be ignored when the certificate is evaluated.

SecTrustSetPolicies

Sets the policies to use in an evaluation.

SecTrustSetOptions

Sets option flags for customizing evaluation of a trust object.

SecTrustOptionFlags

The option flags used to condition a trust evaluation.

SecTrustGetNetworkFetchAllowed

Indicates whether a trust evaluation is permitted to fetch missing intermediate certificates from the network.

SecTrustSetNetworkFetchAllowed

Specifies whether a trust evaluation is permitted to fetch missing intermediate certificates from the network.

SecTrustSetOCSPResponse

Attaches Online Certificate Status Protocol (OSCP) response data to a trust object.

SecTrustSetSignedCertificateTimestamps

Attaches signed certificate timestamp data to a trust object.