Method SSL.ServerConnection()->try_resume_psk_1_3()

class SSL.ServerConnection

Method try_resume_psk_1_3

protected Session|zero try_resume_psk_1_3(string(8bit) psk_identity, string(8bit) psk_binder, int binders_total_bytes, array(int) psk_modes, array(int) cipher_suites)

Description

TLS 1.3 (RFC 8446 section 4.2.11) PSK resumption: verify the client's offered PSK identity 0 (if any) and its binder, and return the cached Session to resume from if everything checks out.

On success, key_schedule is created here (with its early_secret already derived from the real PSK) -- reply_new_session_1_3() must not create another one in that case, just continue advancing the same object.

Returns

The Session to resume, or 0 (zero) if resumption isn't possible or the binder doesn't check out -- in which case the caller must fall back to a full (certificate-based) handshake, exactly as if no PSK had been offered.