From 1ddc890ba11f4456f0b2f25595b77fbfda2d1721 Mon Sep 17 00:00:00 2001 From: Quim Muntal Date: Tue, 29 Nov 2022 08:21:07 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Davis Goodin --- openssl/ecdh.go | 2 -- openssl/ecdh_test.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/openssl/ecdh.go b/openssl/ecdh.go index 0dbb948..a13c411 100644 --- a/openssl/ecdh.go +++ b/openssl/ecdh.go @@ -83,7 +83,6 @@ func NewPrivateKeyECDH(curve string, bytes []byte) (*PrivateKeyECDH, error) { return nil, newOpenSSLError("EC_KEY_set_private_key") } k := &PrivateKeyECDH{curve, key} - // Note: Same as in NewPublicKeyECDH regarding finalizer and KeepAlive. runtime.SetFinalizer(k, (*PrivateKeyECDH).finalize) return k, nil } @@ -208,7 +207,6 @@ func GenerateKeyECDH(curve string) (*PrivateKeyECDH, []byte, error) { } k := &PrivateKeyECDH{curve, key} - // Note: Same as in NewPublicKeyECDH regarding finalizer and KeepAlive. runtime.SetFinalizer(k, (*PrivateKeyECDH).finalize) return k, bytes, nil } diff --git a/openssl/ecdh_test.go b/openssl/ecdh_test.go index 93faa7e..c67364d 100644 --- a/openssl/ecdh_test.go +++ b/openssl/ecdh_test.go @@ -15,7 +15,7 @@ import ( ) // The following tests has been copied from -// https://github.com/golang/go/blob/master/src/crypto/ecdh/ecdh_test.go. +// https://github.com/golang/go/blob/bb0d8297d76cb578baad8fa1485565d9acf44cc5/src/crypto/ecdh/ecdh_test.go. func TestECDH(t *testing.T) { for _, tt := range []string{"P-256", "P-384", "P-521"} {