py-libp2p/libp2p/security/noise/exceptions.py
mhchia d0290d2b5a
Noise: complete handshake process
TODO
- Figure out why `state.rs` is erased at some moment(even handshake
is not done).
- Refactor
- Add tests
2020-02-28 15:49:56 +08:00

23 lines
397 B
Python

from libp2p.security.exceptions import HandshakeFailure
class NoiseFailure(HandshakeFailure):
pass
class HandshakeHasNotFinished(NoiseFailure):
pass
class InvalidSignature(NoiseFailure):
pass
class NoiseStateError(NoiseFailure):
"""Raised when anything goes wrong in the noise state in `noiseprotocol`
package."""
class PeerIDMismatchesPubkey(NoiseFailure):
pass