Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Upgrade to the latest github.com/nspcc-dev/neofs-sdk-go revision #2787

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cmd/neofs-cli/modules/util/sign_bearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/common"
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/commonflags"
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/key"
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
"github.com/nspcc-dev/neofs-sdk-go/user"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -38,7 +38,14 @@
btok := common.ReadBearerToken(cmd, signFromFlag)
pk := key.GetOrGenerate(cmd)

err := btok.Sign(neofsecdsa.SignerRFC6979(*pk))
signer := user.NewAutoIDSignerRFC6979(*pk)
var zeroUsr user.ID
if issuer := btok.Issuer(); !issuer.Equals(zeroUsr) {

Check warning on line 43 in cmd/neofs-cli/modules/util/sign_bearer.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/modules/util/sign_bearer.go#L41-L43

Added lines #L41 - L43 were not covered by tests
// issuer is already set, don't corrupt it
signer = user.NewSigner(signer, issuer)

Check warning on line 45 in cmd/neofs-cli/modules/util/sign_bearer.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/modules/util/sign_bearer.go#L45

Added line #L45 was not covered by tests
}

err := btok.Sign(signer)

Check warning on line 48 in cmd/neofs-cli/modules/util/sign_bearer.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/modules/util/sign_bearer.go#L48

Added line #L48 was not covered by tests
common.ExitOnErr(cmd, "", err)

to := cmd.Flag(signToFlag).Value.String()
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ require (
github.com/nspcc-dev/hrw/v2 v2.0.1
github.com/nspcc-dev/locode-db v0.6.0
github.com/nspcc-dev/neo-go v0.105.1
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240228163253-cb87bbd5e4eb
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4
github.com/nspcc-dev/neofs-contract v0.19.1
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240327164418-bed3d5986cab
github.com/nspcc-dev/tzhash v1.8.0
github.com/olekukonko/tablewriter v0.0.5
github.com/panjf2000/ants/v2 v2.9.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ github.com/nspcc-dev/neo-go v0.105.1 h1:r0b2yIwLBi+ARBKU94gHL9oTFEB/XMJ0YlS2HN9Q
github.com/nspcc-dev/neo-go v0.105.1/go.mod h1:GNh0cRALV/cuj+/xg2ZHDsrFbqcInqG7jjhqsLEnlNc=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240228093917-6a560b9a9559 h1:NHa8O7YldwrOXkZLe/lhs6k9Ay8AtbWk/ti1TBUZqug=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240228093917-6a560b9a9559/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag=
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240228163253-cb87bbd5e4eb h1:vvMxf818Ea2Ql+j9QX7zOlEXDrVlbAzR0DhGvrULilQ=
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240228163253-cb87bbd5e4eb/go.mod h1:7Tm1NKEoUVVIUlkVwFrPh7GG5+Lmta2m7EGr4oVpBd8=
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 h1:arN0Ypn+jawZpu1BND7TGRn44InAVIqKygndsx0y2no=
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4/go.mod h1:7Tm1NKEoUVVIUlkVwFrPh7GG5+Lmta2m7EGr4oVpBd8=
github.com/nspcc-dev/neofs-contract v0.19.1 h1:U1Uh+MlzfkalO0kRJ2pADZyHrmAOroC6KLFjdWnTNR0=
github.com/nspcc-dev/neofs-contract v0.19.1/go.mod h1:ZOGouuwuHpgvYkx/LCGufGncIzEUhYEO18LL4cWEbyw=
github.com/nspcc-dev/neofs-crypto v0.4.1 h1:B6S0zXMWrVFlf/GlII6xKRGWU0VE7dHM+QkoKAO7AQA=
github.com/nspcc-dev/neofs-crypto v0.4.1/go.mod h1:0SHn+sSn+lrrIvonLR8MgbOlBhXZKhc4rw/l2htYeA0=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338 h1:MIOkxFQCxZCRL34hRdmwx+SyljvhXSAqBC1IujH5kdA=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338/go.mod h1:y4oCltutxqnAAsXPKSNarCIp2fWY9keyZW6ZqNzyrEs=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240327164418-bed3d5986cab h1:KKWygIAtS5x59zBa8TvPX4rX+fikkVdhVxl/p4c370s=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240327164418-bed3d5986cab/go.mod h1:2XHytVt+AFQkwr6vpcYvdm13mA2rZxB+STrxtwSrtx8=
github.com/nspcc-dev/rfc6979 v0.2.1 h1:8wWxkamHWFmO790GsewSoKUSJjVnL1fmdRpokU/RgRM=
github.com/nspcc-dev/rfc6979 v0.2.1/go.mod h1:Tk7h5kyUWkhjyO3zUgFFhy1v2vQv3BvQEntakdtqrWc=
github.com/nspcc-dev/tzhash v1.8.0 h1:pJvzME2mZzP/h5rcy/Wb6amT9FJBFeKbJ3HEnWEeUpY=
Expand Down
3 changes: 1 addition & 2 deletions pkg/services/tree/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap"
"github.com/nspcc-dev/neofs-sdk-go/user"
Expand Down Expand Up @@ -77,7 +76,7 @@ func TestMessageSign(t *testing.T) {
cid1 := cidtest.ID()
cid2 := cidtest.ID()

signer := neofsecdsa.SignerRFC6979(privs[0].PrivateKey)
signer := user.NewAutoIDSignerRFC6979(privs[0].PrivateKey)

ownerID := user.ResolveFromECDSAPublicKey(privs[0].PrivateKey.PublicKey)

Expand Down
Loading