X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fhandshake.go;h=c310fded72b7fa0806075667c78248856a30f62a;hb=cb347258e44c70b4b8339a7561ca1023b69c9d2c;hp=bc963d1204d7d914202d2731df51e1cdb550f0d5;hpb=2f73436f54e11e828711d2908624c320b1504d64;p=govpn.git diff --git a/src/cypherpunks.ru/govpn/handshake.go b/src/cypherpunks.ru/govpn/handshake.go index bc963d1..c310fde 100644 --- a/src/cypherpunks.ru/govpn/handshake.go +++ b/src/cypherpunks.ru/govpn/handshake.go @@ -163,15 +163,13 @@ func idTag(id *PeerID, timeSync int, data []byte) ([]byte, error) { return sum[len(sum)-8:], nil } -// HandshakeStarts start handshake's procedure from the client. +// HandshakeStarts starts handshake's procedure from the client. // It is the entry point for starting the handshake procedure. // First handshake packet will be sent immediately. func HandshakeStart(addr string, conn io.Writer, conf *PeerConf) (*Handshake, error) { state := NewHandshake(addr, conn, conf) - var ( - dhPubRepr *[32]byte - err error - ) + var dhPubRepr *[32]byte + var err error if state.dhPriv, dhPubRepr, err = dhKeypairGen(); err != nil { return nil, errors.Wrap(err, "dhKeypairGen") }