tlsfuzzer.runner module

Main event loop for running test cases

class tlsfuzzer.runner.ConnectionState[source]

Bases: object

Keeps the TLS connection state for sending of messages

Variables:
  • msg_sock (MessageSocket) – message level abstraction for TLS Record Socket

  • handshake_hashes – all handshake messages hashed

  • handshake_messages – all hadshake messages exchanged between peers

  • key

    various computed cryptographic keys, hashes and secrets related to handshake and record layer

    premaster_secret - premaster secret from TLS 1.2 and earlier

    client finished handshake hashes - HandshakeHashes object that has the handshake hashes of last handshake (the only Handshake in TLS 1.3) up to and including the client Finished; used for post-handshake authentication

get_last_message_of_type(msg_type)[source]

Returns last handshake message of provided type

get_server_public_key()[source]

Extract server public key from server Certificate message

property prf_name

Return the name of the PRF used for session.

TLS 1.3 specific function

property prf_size

Return the size of the PRF output used for session.

TLS 1.3 specific function

class tlsfuzzer.runner.Runner(conversation)[source]

Bases: object

Test if sending a set of commands returns expected values

run()[source]

Execute conversation

tlsfuzzer.runner.guess_response(content_type, data, ssl2=False)[source]

Guess which kind of message is in the record layer payload