ExpectClientKeyExchange

class mtf.network_port.tls.tls_helpers.ExpectClientKeyExchange

Processor for the TLS Handshake protocol Client Key Exchange message.

This class handles the receipt and processing of the Client Key Exchange message during the TLS handshake.

Attributes:

version (Optional[ProtocolVersion]): The expected TLS version for the handshake. identity (Optional[bytes]): The expected client’s cryptographic identity or key exchange data.

__init__(version: ProtocolVersion | None = None, identity: bytes | None = None)

Initialize the ExpectClientKeyExchange processor.

Args:

version (Optional[ProtocolVersion]): The expected TLS version for the handshake. identity (Optional[bytes]): The expected client’s cryptographic identity or key exchange data.

process(state: ConnectionState, msg: Message)

Process the received Client Key Exchange message.

Args:

state (ConnectionState): The current handshake state containing version and handshake messages. msg (Message): The message containing the Client Key Exchange data.

Raises:

AssertionError: If the message content type or handshake type does not match expected values.

add_child(child)

Sets the parameter as the child of the node

Returns:

the child node

get_all_siblings()

Return iterator with all siblings of node

Return type:

iterator

is_command()

Flag to tell that the object is a message processor

is_expect()

Flag to tell if the object is a message processor

is_generator()

Flag to tell that the object is not a message generator

is_match(msg)

Check if message is a given type of handshake protocol message