Function

SSLCopyPeerTrust

Retrieves a trust management object for the certificate used by a session.

Declaration

OSStatus SSLCopyPeerTrust(SSLContextRef context, SecTrustRef  _Nullable *trust);

Parameters

context

An SSL session context reference.

trust

On return, a trust management object you can use to evaluate trust for the certificate used by the session. A trust management object includes the certificate to be verified plus the policy or policies to be used in evaluating trust. See Certificate, Key, and Trust Services for functions to create and evaluate trust management objects. You must call the CFRelease function for this object when you are finished with it.

Return Value

A result code. See Secure Transport Result Codes.

Discussion

This function is valid any time after a handshake attempt.

See Also

Authentication

SSLAddDistinguishedName

Adds a DER-encoded distinguished name to a list of acceptable names to be specified in requests for client certificates.

Deprecated
SSLCopyDistinguishedNames

Retrieves the distinguished names of acceptable certification authorities.

Deprecated
SSLSetCertificate

Specifies this connection’s certificate or certificates.

Deprecated
SSLGetClientCertificateState

Retrieves the exchange status of the client certificate.

Deprecated
SSLClientCertificateState

An enumeration of the states of client certificate exchange.

SSLSetOCSPResponse

Sets the OCSP response for the given SSL session.

Deprecated
SSLSetSessionTicketsEnabled

Enables or disables session ticket resumption.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software