Class SSL.ClientConnection

Inheritance graph
SSL.Connection SSL.ClientConnection

class SSL.ClientConnection
Description

Client-side connection state.


Inherit Connection

inherit Connection : Connection


Variable client_cert_types
Variable client_cert_distinguished_names

array(int)|zero SSL.ClientConnection.client_cert_types
array(string(8bit))|zero SSL.ClientConnection.client_cert_distinguished_names

Description

A few storage variables for client certificate handling on the client side.


Variable client_key_share_group
Variable client_key_share_secret

protected int SSL.ClientConnection.client_key_share_group
protected Gmp.mpz|string(8bit)|zero SSL.ClientConnection.client_key_share_secret

Description

TLS 1.3 and later: our ephemeral key share, set up in client_hello() and consumed once the server's key_share response arrives in ServerHello.


Variable early_data_sent_1_3

bool SSL.ClientConnection.early_data_sent_1_3

Description

TLS 1.3 (RFC 8446 section 2.3/RFC 8446 section 4.2.10): true once client_hello() has queued 0-RTT early-data records for this connection (independent of whether the server ends up accepting them -- see early_data_accepted_1_3).

See also

early_data_write_state_1_3


Variable early_data_write_state_1_3

protected State|zero SSL.ClientConnection.early_data_write_state_1_3

Description

TLS 1.3: the State (keyed from client_early_traffic_secret) built in client_hello() to send 0-RTT early-data records, kept around until either reused once more to send HANDSHAKE_end_of_early_data (if the server accepted -- see RFC 8446 section 4.5) or simply discarded (if not). Reusing the exact same object (rather than building a fresh one from the same secret) matters: a fresh State would restart its AEAD sequence number at 0, reusing a nonce already used by an earlier early-data chunk and desyncing the server's own (single, continuously incrementing) read-state counter for this key.


Variable got_hello_retry_request

protected bool SSL.ClientConnection.got_hello_retry_request

Description

TLS 1.3 (RFC 8446 section 4.1.4): set once we've processed one HelloRetryRequest, since a client MUST abort on a second one.


Method create

SSL.ClientConnection SSL.ClientConnection(Context ctx, string(8bit)|void server_name, Session|void session, string(8bit)|void early_data)

Description

Initialize a new ClientConnection.

Parameter ctx

Context to use.

Parameter server_name

Optional host name of the server.

Parameter session

Optional Session to resume.

Parameter early_data

TLS 1.3 (RFC 8446 section 2.3) 0-RTT application data to send immediately, opportunistically -- see client_hello()'s own parameter doc for exactly when this is (and isn't) actually sent as 0-RTT.