Skip to content

Commit

Permalink
*: Upgrade to the latest github.com/nspcc-dev/neofs-sdk-go revision
Browse files Browse the repository at this point in the history
It brings breaking (for good) changes which need to be adapted asap.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Mar 27, 2024
1 parent f4812fa commit 8f79966
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
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 @@ import (
"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 @@ func signBearerToken(cmd *cobra.Command, _ []string) {
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) {
// issuer is already set, don't corrupt it
signer = user.NewSigner(signer, issuer)
}

err := btok.Sign(signer)
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.20240326133951-7f940dcb37d8
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.20240326133951-7f940dcb37d8 h1:0qr5CEPXp94CRnYyikKu54lJgFLBVJ7Per+zXIBr6tc=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240326133951-7f940dcb37d8/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

0 comments on commit 8f79966

Please sign in to comment.