[#1322] Use new protobuf marshaler
All checks were successful
DCO action / DCO (pull_request) Successful in 1m43s
Tests and linters / Run gofumpt (pull_request) Successful in 1m34s
Build / Build Components (1.21) (pull_request) Successful in 2m14s
Vulncheck / Vulncheck (pull_request) Successful in 1m57s
Build / Build Components (1.22) (pull_request) Successful in 2m42s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m42s
Tests and linters / Staticcheck (pull_request) Successful in 3m11s
Tests and linters / Tests (1.22) (pull_request) Successful in 3m18s
Tests and linters / Lint (pull_request) Successful in 3m29s
Tests and linters / gopls check (pull_request) Successful in 3m43s
Tests and linters / Tests with -race (pull_request) Successful in 3m56s
Tests and linters / Tests (1.21) (pull_request) Successful in 1m18s

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-19 18:28:53 +03:00
parent cfda9003a7
commit 80bd32e866
29 changed files with 24581 additions and 17533 deletions

View file

@ -44,7 +44,7 @@ func verifyResponse(cmd *cobra.Command,
GetSign() []byte
},
body interface {
StableMarshal([]byte) []byte
MarshalProtobuf([]byte) []byte
},
) {
if sigControl == nil {
@ -60,7 +60,7 @@ func verifyResponse(cmd *cobra.Command,
var sig frostfscrypto.Signature
commonCmd.ExitOnErr(cmd, "can't read signature: %w", sig.ReadFromV2(sigV2))
if !sig.Verify(body.StableMarshal(nil)) {
if !sig.Verify(body.MarshalProtobuf(nil)) {
commonCmd.ExitOnErr(cmd, "", errors.New("invalid response signature"))
}
}