session: remove trivial defaultCurve function

This commit is contained in:
Leonard Lyubich 2020-04-29 12:46:05 +03:00
parent 701bbafcf1
commit f0867036fb
2 changed files with 2 additions and 7 deletions

View file

@ -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
}

View file

@ -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.