2020-02-15 12:12:12 +08:00
|
|
|
from libp2p.security.exceptions import HandshakeFailure
|
|
|
|
|
|
|
|
|
|
|
|
class NoiseFailure(HandshakeFailure):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class HandshakeHasNotFinished(NoiseFailure):
|
|
|
|
pass
|
2020-02-16 00:42:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
class InvalidSignature(NoiseFailure):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class NoiseStateError(NoiseFailure):
|
|
|
|
"""Raised when anything goes wrong in the noise state in `noiseprotocol`
|
|
|
|
package."""
|
|
|
|
|
|
|
|
|
|
|
|
class PeerIDMismatchesPubkey(NoiseFailure):
|
|
|
|
pass
|