]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/handshake.go
Use Argon2d PHC winner instead of PBKDF2
[govpn.git] / src / govpn / handshake.go
index 24a0f1f5a7dbb44ef486c3f5d1b5151418615f83..f0a8e65202130cf7302603ea21a08fa9353fa8f3 100644 (file)
@@ -142,7 +142,7 @@ func NewHandshake(addr string, conn io.Writer, conf *PeerConf) *Handshake {
                Conf:     conf,
        }
        state.dsaPubH = new([ed25519.PublicKeySize]byte)
-       copy(state.dsaPubH[:], state.Conf.DSAPub[:])
+       copy(state.dsaPubH[:], state.Conf.Verifier.Pub[:])
        HApply(state.dsaPubH)
        return &state
 }
@@ -252,7 +252,7 @@ func (h *Handshake) Server(data []byte) *Peer {
                }
                sign := new([ed25519.SignatureSize]byte)
                copy(sign[:], dec[RSize+RSize+SSize:])
-               if !ed25519.Verify(h.Conf.DSAPub, h.key[:], sign) {
+               if !ed25519.Verify(h.Conf.Verifier.Pub, h.key[:], sign) {
                        log.Println("Invalid signature from", h.addr)
                        return nil
                }