forked from TrueCloudLab/frostfs-node
[#562] pkg: remove nspcc-dev/neofs-crypto
dependency
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
5cab0026c3
commit
9142c778c7
7 changed files with 51 additions and 38 deletions
|
@ -2,15 +2,17 @@ package object
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/storagegroup"
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
)
|
||||
|
||||
|
@ -106,7 +108,12 @@ func (v *FormatValidator) validateSignatureKey(obj *Object) error {
|
|||
}
|
||||
|
||||
func (v *FormatValidator) checkOwnerKey(id *owner.ID, key []byte) error {
|
||||
wallet, err := owner.NEO3WalletFromPublicKey(crypto.UnmarshalPublicKey(key))
|
||||
pub, err := keys.NewPublicKeyFromBytes(key, elliptic.P256())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
wallet, err := owner.NEO3WalletFromPublicKey((*ecdsa.PublicKey)(pub))
|
||||
if err != nil {
|
||||
// TODO: check via NeoFSID
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue