Instance Method

provideIdentityForConnection:completionHandler:

Provide the identity and an optional certificate chain to be used for authentication

Declaration

- (void)provideIdentityForConnection:(NWTCPConnection *)connection completionHandler:(void (^)(SecIdentityRef identity, NSArray<id> *certificateChain))completion;

Parameters

connection

The connection sending this message

completionHandler

The completion handler for passing an identity and certificate chain to the connection. The identity is required and must not be nil. The certificateChain argument is optional, and is an array of one or more SecCertificateRef objects. The certificate chain must contain objects of type SecCertificateRef only. If the certificate chain is set, it will be used. Otherwise, the leaf certificate will be extracted from the SecIdentityRef object and will be used for authentication.

The caller is responsible for keeping the argument object(s) valid for the duration of the completion handler invocation.

Discussion

Optional. If this method is not implemented, the default certificate evaluation will be used.

See Also

Delegate Methods

- shouldEvaluateTrustForConnection:

Indicate that the delegate should override the default trust evaluation for the connection

- evaluateTrustForConnection:peerCertificateChain:completionHandler:

Override the default trust evaluation for the connection

- shouldProvideIdentityForConnection:

Indicate that the delegate can provide an identity for the connection authentication

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