PskClientKeyExchangeGenerator

class mtf.network_port.tls.tls_helpers.PskClientKeyExchangeGenerator

Generator for TLS handshake protocol Client Key Exchange messages.

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

Initialize the ClientKeyExchangeGenerator.

Args:

version (Optional[ProtocolVersion]): The TLS version being used for the handshake. identity (Optional[bytes]): The client’s cryptographic identity, typically

an integer derived from a public key or other cryptographic material.

generate(state: ConnectionState)

Generate a Client Key Exchange message.

This method creates and returns a ClientKeyExchange message based on the provided TLS version and identity.

Args:
state: The current state of the TLS handshake, typically containing

information such as client version, random data, etc.

Returns:

ClientKeyExchange: The generated Client Key Exchange message.

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()

Define object as a generator node.

is_expect()

Define object as a generator node.

is_generator()

Define object as a generator node.

post_send(state)

Update handshake hashes after sending.