X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fhandshake.go;h=054c73e32f3718c7293fb575d91e6ea175a1f09b;hp=47fe4e9056f1131d8e2b3e7b361cee0d24c585c6;hb=8deaf99f98548064f51a3fe5a163456257c089bb;hpb=20ff2ad78ed00dea12b7fd689963a863a53ef993;ds=sidebyside diff --git a/src/cypherpunks.ru/govpn/handshake.go b/src/cypherpunks.ru/govpn/handshake.go index 47fe4e9..054c73e 100644 --- a/src/cypherpunks.ru/govpn/handshake.go +++ b/src/cypherpunks.ru/govpn/handshake.go @@ -141,8 +141,8 @@ func idTag(id *PeerId, timeSync int, data []byte) []byte { panic(err) } mac.Write(enc) - mac.Sum(enc[:0]) - return enc + sum := mac.Sum(nil) + return sum[len(sum)-8:] } // Start handshake's procedure from the client. It is the entry point