Method SSL.Context()->encode_ticket_1_3()
classSSL.Context
- Method
encode_ticket_1_3
array(string(8bit)|int)|zeroencode_ticket_1_3(Sessionsession,string(8bit)psk)- Description
TLS 1.3 (RFC 8446 section 4.6.1) analogue of encode_ticket(): issue a ticket carrying a resumption PSK, rather than TLS 1.0-1.2's master_secret-based ticket. Reuses the same
session_cachestorage and keying (by ticket bytes) as encode_ticket() -- decode_ticket()'s default implementation (a plain lookup_session()) works unchanged for either kind of ticket; the two are told apart by whetherSession()->tls13_pskis set.- Parameter
session The just-completed TLS 1.3 connection's session. Its Session.identity is temporarily repointed at the new ticket for caching purposes, exactly as encode_ticket() does, then restored.
- Parameter
psk The resumption PSK, derived by the caller from this connection's
key_schedule->resumption_master_secretand a per-ticket nonce (RFC 8446 section 4.6.1).- Note
The caller is responsible for setting
session-> tls13_alpn_protocol(from the connection's negotiatedapplication_protocol, if any) before calling this -- that's connection-level state this Context method has no access to. max_early_data_size (below) is policy this Context does own, so it's applied here directly.- Returns
Array string(8bit)0The opaque ticket, or
0(zero) if tickets aren't offered.int1Ticket lifetime in seconds.
int2The ticket_age_add obfuscation value (RFC 8446 section 4.2.11).
- See also