修改握手时的签名算法

This commit is contained in:
lwch
2022-09-09 13:50:55 +08:00
parent 3e78c72661
commit 71410f99b2
6 changed files with 50 additions and 9 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func (h *Handler) readHandshake(c *network.Conn) (string, error) {
if msg.GetXType() != network.Msg_handshake {
return "", errNotHandshake
}
n := bytes.Compare(msg.GetHsp().GetEnc(), h.cfg.Enc[:])
n := bytes.Compare(msg.GetHsp().GetEnc(), h.cfg.Hasher.Hash())
if n != 0 {
return "", errInvalidHandshake
}