diff --git a/handshake_client_tls13.go b/handshake_client_tls13.go index 12ff3a4..3bdd937 100644 --- a/handshake_client_tls13.go +++ b/handshake_client_tls13.go @@ -353,7 +353,7 @@ func (hs *clientHandshakeStateTLS13) establishHandshakeKeys() error { c.sendAlert(alertIllegalParameter) return errors.New("tls: invalid server key share") } - sharedKey, err := hs.ecdheKey.Curve().ECDH(hs.ecdheKey, peerKey) + sharedKey, err := hs.ecdheKey.ECDH(peerKey) if err != nil { c.sendAlert(alertIllegalParameter) return errors.New("tls: invalid server key share") diff --git a/handshake_server_tls13.go b/handshake_server_tls13.go index 9b7356a..80d4dce 100644 --- a/handshake_server_tls13.go +++ b/handshake_server_tls13.go @@ -220,7 +220,7 @@ GroupSelection: c.sendAlert(alertIllegalParameter) return errors.New("tls: invalid client key share") } - hs.sharedKey, err = key.Curve().ECDH(key, peerKey) + hs.sharedKey, err = key.ECDH(peerKey) if err != nil { c.sendAlert(alertIllegalParameter) return errors.New("tls: invalid client key share") diff --git a/key_agreement.go b/key_agreement.go index 027060d..2c8c5b8 100644 --- a/key_agreement.go +++ b/key_agreement.go @@ -264,7 +264,7 @@ func (ka *ecdheKeyAgreement) processClientKeyExchange(config *Config, cert *Cert if err != nil { return nil, errClientKeyExchange } - preMasterSecret, err := ka.key.Curve().ECDH(ka.key, peerKey) + preMasterSecret, err := ka.key.ECDH(peerKey) if err != nil { return nil, errClientKeyExchange } @@ -307,7 +307,7 @@ func (ka *ecdheKeyAgreement) processServerKeyExchange(config *Config, clientHell if err != nil { return errServerKeyExchange } - ka.preMasterSecret, err = key.Curve().ECDH(key, peerKey) + ka.preMasterSecret, err = key.ECDH(peerKey) if err != nil { return errServerKeyExchange }