ServerKeyExchangeGenerator

class mtf.network_port.tls.tls_helpers.ServerKeyExchangeGenerator

Generator for TLS handshake protocol Server Key Exchange messages.

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

Initialize the ServerKeyExchangeGenerator.

Args:

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

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

generate(state: ConnectionState)

Generate a Server Key Exchange message.

This method creates and returns a ServerKeyExchange 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:

ServerKeyExchange: The generated Server 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.