]> Cypherpunks.ru repositories - govpn.git/commitdiff
Fix awful bug with expected nonces
authorSergey Matveev <stargrave@stargrave.org>
Tue, 14 Feb 2017 08:06:17 +0000 (11:06 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 14 Feb 2017 08:06:17 +0000 (11:06 +0300)
src/cypherpunks.ru/govpn/peer.go

index e43dc9c75c235f54dcf206209e17b62105cde430..37bd8405182afea9f205afd2782c1dbd9b97593e 100644 (file)
@@ -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()