Security Options

Configure security options for TLS handshakes.


Configuring TLS Handshake Options

typealias sec_protocol_options_t

An object that contains security options to use for TLS handshakes.

func sec_protocol_options_add_tls_application_protocol(sec_protocol_options_t, UnsafePointer<Int8>)

Adds an Application-Layer Protocol Negotiation (ALPN) value to present in the TLS handshake.

func sec_protocol_options_add_tls_ciphersuite(sec_protocol_options_t, SSLCipherSuite)

Adds a supported TLS ciphersuite to the configuration.

func sec_protocol_options_add_tls_ciphersuite_group(sec_protocol_options_t, SSLCiphersuiteGroup)

Adds a supported TLS ciphersuite group to the configuration.


Handling TLS Events

typealias sec_protocol_verify_t

A block that delivers a trust object for verification during a TLS handshake.

typealias sec_protocol_verify_complete_t

A block you return to indicate the result of a trust verification, where true indicates verification success.

typealias sec_protocol_challenge_t

A block that delivers the current TLS state for a handshake upon an identity challenge.

typealias sec_protocol_challenge_complete_t

A block you return to indicate the identity with which to reply to a challenge.

typealias sec_protocol_key_update_t

A block that delivers the current TLS state upon a key update.

typealias sec_protocol_key_update_complete_t

A block you return to indicate that you have finished responding to a key update.

Managing Security Objects

func sec_release(UnsafeMutableRawPointer!)

Releases a reference count on a security object.

typealias sec_object_t

The generic type for security objects used with the Network framework.

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