Noise: complete handshake process

TODO
- Figure out why `state.rs` is erased at some moment(even handshake
is not done).
- Refactor
- Add tests
This commit is contained in:
mhchia
2020-02-16 00:42:49 +08:00
parent 8a4ebd4cbb
commit d0290d2b5a
6 changed files with 176 additions and 24 deletions

View File

@ -7,3 +7,16 @@ class NoiseFailure(HandshakeFailure):
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