diff options
author | Riobard Zhan <me@riobard.com> | 2020-09-10 02:06:44 +0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-14 10:46:00 +0200 |
commit | 2c143dce0ff55feb35c7f6b9199479db88909903 (patch) | |
tree | bb22f8ee6531aaedb338caf56f404ad0d96c96e2 /device | |
parent | 22af3890f60d11472977f2fbdf50e6d5b406e356 (diff) |
replay: minor API changes to more idiomatic Go
Signed-off-by: Riobard Zhan <me@riobard.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device')
-rw-r--r-- | device/keypair.go | 2 | ||||
-rw-r--r-- | device/noise-protocol.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/device/keypair.go b/device/keypair.go index 2f2f222..254e696 100644 --- a/device/keypair.go +++ b/device/keypair.go @@ -26,7 +26,7 @@ type Keypair struct { sendNonce uint64 send cipher.AEAD receive cipher.AEAD - replayFilter replay.ReplayFilter + replayFilter replay.Filter isInitiator bool created time.Time localIndex uint32 diff --git a/device/noise-protocol.go b/device/noise-protocol.go index be92b4b..1dc854f 100644 --- a/device/noise-protocol.go +++ b/device/noise-protocol.go @@ -567,7 +567,7 @@ func (peer *Peer) BeginSymmetricSession() error { keypair.created = time.Now() keypair.sendNonce = 0 - keypair.replayFilter.Init() + keypair.replayFilter.Reset() keypair.isInitiator = isInitiator keypair.localIndex = peer.handshake.localIndex keypair.remoteIndex = peer.handshake.remoteIndex |