From f0867036fbd3818a1c7d2d38b5692fe73244260c Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 29 Apr 2020 12:46:05 +0300 Subject: [PATCH] session: remove trivial defaultCurve function --- session/private.go | 3 ++- session/store.go | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/session/private.go b/session/private.go index 4d4f3c20..a1592279 100644 --- a/session/private.go +++ b/session/private.go @@ -2,6 +2,7 @@ package session import ( "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" crypto "github.com/nspcc-dev/neofs-crypto" @@ -16,7 +17,7 @@ type pToken struct { // // Returns non-nil error on key generation error. func NewPrivateToken() (PrivateToken, error) { - sk, err := ecdsa.GenerateKey(defaultCurve(), rand.Reader) + sk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { return nil, err } diff --git a/session/store.go b/session/store.go index fa3ca69b..5cd6314a 100644 --- a/session/store.go +++ b/session/store.go @@ -1,7 +1,6 @@ package session import ( - "crypto/elliptic" "sync" ) @@ -11,11 +10,6 @@ type mapTokenStore struct { tokens map[TokenID]PrivateToken } -// TODO get curve from neofs-crypto -func defaultCurve() elliptic.Curve { - return elliptic.P256() -} - // NewMapTokenStore creates new PrivateTokenStore instance. // // The elements of the instance are stored in the map.