From 4658474c60ddaa959fa29a8ff7c381ab6d664a07 Mon Sep 17 00:00:00 2001 From: wdvxdr Date: Fri, 2 Dec 2022 14:07:03 +0800 Subject: [PATCH] internal/crypto: fix build with go1.20 --- internal/crypto/ecdh_120.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/crypto/ecdh_120.go b/internal/crypto/ecdh_120.go index 12f8fa4e..c563cbd3 100644 --- a/internal/crypto/ecdh_120.go +++ b/internal/crypto/ecdh_120.go @@ -12,7 +12,7 @@ func (e *ECDH) init(svrPubKey []byte) { p256 := ecdh.P256() local, _ := p256.GenerateKey(rand.Reader) remote, _ := p256.NewPublicKey(svrPubKey) - share, _ := p256.ECDH(local, remote) + share, _ := local.ECDH(remote) hash := md5.New() hash.Write(share[:16])