Class SSL.State

class SSL.State
Description

The state object handles a one-way stream of packets, and operates in either decryption or encryption mode. A connection switches from one set of state objects to another, one or more times during its lifetime.


Variable aead_limit_rekey_signaled
Variable aead_limit_close_signaled

protected bool SSL.State.aead_limit_rekey_signaled
protected bool SSL.State.aead_limit_close_signaled

Description

TLS 1.3 and later (RFC 9846 section 5.5): edge-triggered latches for check_aead_usage_limit(), so each outcome fires at most once per State object (a fresh one is always built on rekey, so these never need resetting).


Variable crypt

Cipher.CipherAlgorithm SSL.State.crypt

Description

Encryption or decryption object.


Variable mac

Cipher.MACAlgorithm SSL.State.mac

Description

Message Authentication Code


Variable next_seq_num

int SSL.State.next_seq_num

Description

64-bit sequence number.


Variable salt

string SSL.State.salt

Description

TLS 1.2 IV salt. This is used as a prefix for the IV for the AEAD cipher algorithms.


Variable session

Session SSL.State.session

Description

Information about the used algorithms.


Variable tls_iv

int SSL.State.tls_iv

Description

TLS IV prefix length.


Variable version

ProtocolVersion SSL.State.version

Description

The negotiated protocol version, as of when this state was created.

Note

This is distinct from a Packet's protocol_version, which is always clamped to PROTOCOL_TLS_1_2 on the wire for TLS 1.3 and later (RFC 8446 section 5.1) -- this field is what decrypt_packet()/encrypt_packet() use to decide whether to apply TLS 1.3 record-protection rules.