From 56014a7efddf3870ba3841bcb03ab737dfc17710 Mon Sep 17 00:00:00 2001 From: postmannen Date: Wed, 9 Feb 2022 11:15:00 +0100 Subject: [PATCH] added only signature checking for REQCliCommand --- central_auth.go | 1 + signatures.go | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 central_auth.go diff --git a/central_auth.go b/central_auth.go new file mode 100644 index 0000000..5fd4681 --- /dev/null +++ b/central_auth.go @@ -0,0 +1 @@ +package steward diff --git a/signatures.go b/signatures.go index da6b9d3..bc58a18 100644 --- a/signatures.go +++ b/signatures.go @@ -217,6 +217,11 @@ func (s *signatures) verifySignature(m Message) bool { return true } + if m.Method != REQCliCommand { + fmt.Printf(" * DEBUG: verifySignature: WAS OTHER THAN CLI COMMAND\n") + return true + } + // Verify if the signature matches. argsStringified := argsToString(m.MethodArgs) ok := ed25519.Verify(s.SignPublicKey, []byte(argsStringified), m.ArgSignature)