ServerHelloDoneGenerator
- class mtf.network_port.tls.tls_helpers.ServerHelloDoneGenerator
Generator for TLS handshake protocol Server Hello Done messages.
This class is responsible for generating the Server Hello Done message in the TLS handshake process. The Server Hello Done message indicates that the server has finished its part of the negotiation.
- Attributes:
- version (Optional[ProtocolVersion]): The version of the TLS protocol to use.
If None, the version from the client’s state will be used.
ssl2 (bool): A flag indicating whether SSLv2 should be supported. modifiers (Optional[List[Callable]]): A list of functions that modify the
handshake message or its state.
- __init__(version: ProtocolVersion | None = None, ssl2: bool = False, modifiers: List[Callable] | None = None)
Initialize the ServerHelloDoneGenerator.
- Args:
- version (Optional[ProtocolVersion]): The TLS version to use. Defaults to None,
meaning the client’s version will be used.
- ssl2 (bool): Whether to generate a Server Hello Done message compatible
with SSLv2. Defaults to False.
- modifiers (Optional[List[Callable]]): A list of modifier functions to apply
to the handshake message or state.
- generate(state: ConnectionState)
Generate a Server Hello Done message.
This method creates the Server Hello Done message, which is sent by the server to indicate the end of its part in the TLS handshake.
- Args:
- state: The current state of the handshake, containing relevant
information such as client version.
- Returns:
ServerHelloDone: The generated Server Hello Done 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.