iOS reference / Network / DTLSNetwork · IOS API REFERENCE
DTLS struct · iOS 27.0+ · SDK 27.1
struct DTLSThe system definition of the Datagram Transport Layer Security (DTLS) protocol.
Supports sending and receiving encrypted byte datagrams.
Members (9) method · iOS 27.0+ cipherSuites TypeScript cipherSuites(suites: Array<_Security_tls_ciphersuite_t>): DTLSSwift declaration func cipherSuites(_ suites: [tls_ciphersuite_t]) -> DTLSSet DTLS ciphersuites to the set of enabled ciphersuites.
- Parameter suites: The cipher suites to set.
method · iOS 27.0+ localIdentity TypeScript localIdentity(identity: Implements<_Security_OS_sec_identity> | SDKHandle): DTLSSwift declaration func localIdentity(_ identity: sec_identity_t) -> DTLSSet the local identity DTLS uses during the handshake.
- Parameter identity: The local identity to be used during the DTLS handshake.
method · iOS 27.0+ ticketsEnabled TypeScript ticketsEnabled(enabled: boolean): DTLSSwift declaration func ticketsEnabled(_ enabled: Bool) -> DTLSEnable DTLS session ticket support.
- Parameter enabled: True if enabled, false otherwise.
method · iOS 27.0+ earlyDataEnabled TypeScript earlyDataEnabled(enabled: boolean): DTLSSwift declaration func earlyDataEnabled(_ enabled: Bool) -> DTLSEnable early data (0-RTT) for DTLS.
> Warning: This may have security implications for application data.
In particular, DTLS early data is replayable by a network attacker.
You must account for this when sending data before the handshake
is confirmed. See RFC 8446 for more information. You MUST NOT
enable fast open without a specific application profile that defines its use.
- Parameter enabled: True to enable early data, false otherwise.
method · iOS 27.0+ cipherSuiteGroups TypeScript cipherSuiteGroups(groups: Array<_Security_tls_ciphersuite_group_t>): DTLSSwift declaration func cipherSuiteGroups(_ groups: [tls_ciphersuite_group_t]) -> DTLSSet DTLS ciphersuite groups to the set of enabled ciphersuites.
- Parameter groups: The cipher suite groups to set.
method · iOS 27.0+ peerAuthentication TypeScript peerAuthentication(preference: DTLS_PeerAuthentication): DTLSSwift declaration func peerAuthentication(_ preference: DTLS.PeerAuthentication) -> DTLSSpecify a preference for how to authenticate the peer.
- Parameter preference: The peer authentication preference.
method · iOS 27.0+ applicationProtocols TypeScript applicationProtocols(protocols: Array<string>): DTLSSwift declaration func applicationProtocols(_ protocols: [String]) -> DTLSSet application protocols supported by clients of this protocol.
Application layer protocol negotiation (ALPN) tokens
describe the application protocol in use above DTLS.
- Parameters protocols: An array of application layer protocol
tokens to use for negotiation during the DTLS handshake.
method · iOS 27.0+ version TypeScript version(min?: (_Security_tls_protocol_version_t) | null, max?: (_Security_tls_protocol_version_t) | null): DTLSSwift declaration func version(min: tls_protocol_version_t? = nil, max: tls_protocol_version_t? = nil) -> DTLSinit · iOS 27.0+ init TypeScript static init(): DTLSSwift declaration init()Create a DTLS protocol to use in a protocol stack.
Skipped declarations 2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
DTLS.init(_:)
callback cannot propagate synchronous failure
DTLS.certificateValidator(_:)
This Swift callback must itself suspend asynchronously. (nonthrowing, so a rejected promise cannot reach swift)
All Network types →