Details
An NTorFSM steps through each state of a circuit handshake. At each step an NTorFSM expects to receive a certain kind of cell. Either this cell is received, processed, and a response cell is returned or an exception is raised (and the circuit is destroyed).
NTorFSM’s also derive key material and add RelayCrypto objects to the associated circuit’s crypt_path.
Bases: object
Finite state machine to step through an ntor handshake with relays on a circuit’s path.
Call a handler function to process cell based on this ntor fsm’s current state.
Parameters: | cell (cell) – cell received from this ntor fsm’s circuit |
---|---|
Returns: | cell, None may return either the next cell to send to step through handshakes with relays on this path or None if no response is required |