Contents

SecTrustSetOCSPResponse(_:_:)

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

Declaration

func SecTrustSetOCSPResponse(_ trust: SecTrust, _ responseData: CFTypeRef?) -> OSStatus

Parameters

  • trust:

    The trust evaluation object to modify.

  • responseData:

    Either a Cfdata object containing a single DER-encoded OCSPResponse (per Rfc2560), or a Cfarray of these.

Return Value

A result code. See Security Framework Result Codes.

Discussion

This function allows the caller to provide OCSPResponse data (which may be obtained during a TLS/SSL handshake, per RFC3546) as input to a trust evaluation. If this data is available, it can obviate the need to contact an OCSP server for current revocation information.