A delegate protocol to customize the TLS authentication done by a connection.


protocol NWTCPConnectionAuthenticationDelegate


A delegate is not required for an NWTCPConnection object.


Delegate Methods

func shouldEvaluateTrust(for: NWTCPConnection) -> Bool

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

func shouldProvideIdentity(for: NWTCPConnection) -> Bool

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

func provideIdentity(for: NWTCPConnection, completionHandler: (SecIdentity, [Any]) -> Void)

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


Inherits From

See Also

TCP Connections

class NWTCPConnection

An object to manage a TCP connection, with or without TLS.

class NWTLSParameters

TLS properties for creating a connection.

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