The burn decision now lives solely in the Session dispatch: chab3's WireError (unauthentic or truncated box) proves no key knowledge and burns nothing; any other ValueError/struct.error means a peer who opened the box misbehaved, so the credential burns. handshake.py drops its try/except wrappers and the _check helper; inner-box WireErrors are reclassified to plain ValueError since they occur inside an already valid outer box.
7 lines
235 B
Python
7 lines
235 B
Python
"""ProtocolError, in its own module so transport wrappers (ws.py) and
|
|
applications can import it without the sans-io machinery."""
|
|
|
|
|
|
class ProtocolError(Exception):
|
|
"""Peer, wire, or protocol-misuse failure: log and disconnect."""
|