From 30697303bd8e3a2489627962252928bc125ff472 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 14 Feb 2017 11:06:17 +0300 Subject: [PATCH] Fix awful bug with expected nonces --- src/cypherpunks.ru/govpn/peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cypherpunks.ru/govpn/peer.go b/src/cypherpunks.ru/govpn/peer.go index e43dc9c..37bd840 100644 --- a/src/cypherpunks.ru/govpn/peer.go +++ b/src/cypherpunks.ru/govpn/peer.go @@ -63,7 +63,7 @@ func newNonces(key *[32]byte, i uint64) chan *[NonceSize]byte { buf := new([NonceSize]byte) binary.BigEndian.PutUint64(buf[:], i) mac.Write(buf[:]) - mac.Sum(sum[0:]) + mac.Sum(sum[:0]) copy(buf[:], sum) nonces <- buf mac.Reset() -- 2.44.0