From: Sergey Matveev Date: Tue, 14 Feb 2017 08:06:17 +0000 (+0300) Subject: Fix awful bug with expected nonces X-Git-Tag: 7.2^2~1 X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=30697303bd8e3a2489627962252928bc125ff472 Fix awful bug with expected nonces --- 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()