forked from TrueCloudLab/frostfs-sdk-go
[#190] Refactor cryptographic functionality
Remove `signature` and `util/signature` packages. Re-implement their functionality in new `crypto` package. Generalize the approach of digital signature computation and verification by adding `Signer` and `PublicKey` primitives similar to standard `crypto` package. Support already exising in protocol signature schemes. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2deaaeef05
commit
ea043f4ca3
33 changed files with 728 additions and 627 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test"
|
||||
ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
sigtest "github.com/nspcc-dev/neofs-sdk-go/signature/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/version"
|
||||
versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -86,15 +85,6 @@ func TestContainer_SessionToken(t *testing.T) {
|
|||
require.Equal(t, tok, cnr.SessionToken())
|
||||
}
|
||||
|
||||
func TestContainer_Signature(t *testing.T) {
|
||||
sig := sigtest.Signature()
|
||||
|
||||
cnr := container.New()
|
||||
cnr.SetSignature(sig)
|
||||
|
||||
require.Equal(t, sig, cnr.Signature())
|
||||
}
|
||||
|
||||
func TestContainer_ToV2(t *testing.T) {
|
||||
t.Run("nil", func(t *testing.T) {
|
||||
var x *container.Container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue