ExpectClientHello
- class mtf.network_port.tls.tls_helpers.ExpectClientHello
A class that processes the ClientHello message during a TLS handshake.
This class inherits from ExpectHandshake and is responsible for handling the ClientHello message as defined in the TLS protocol. The ClientHello message is the first message sent by the client to initiate the handshake.
- Attributes:
- client_ciphers (dict, optional): A dictionary to store the cipher suites
offered by the client.
- __init__(client_ciphers=None)
Initializes the ExpectClientHello handler.
- Args:
- client_ciphers (dict, optional): A dictionary to store the cipher suites
offered by the client. Defaults to None.
- process(state: ConnectionState, msg: Message)
Processes the ClientHello message received from the client.
This method asserts that the message is of the expected type and parses the ClientHello message. It extracts and stores the client’s cipher suites and TLS version in the provided state object. Additionally, it updates the handshake messages and hashes within the state.
- Args:
- state (object): The current state of the TLS connection, which will
be updated based on the parsed ClientHello message.
msg (object): The message object containing the ClientHello data.
- Raises:
- AssertionError: If the message type does not match the expected
ContentType or HandshakeType.
- 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