1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-31 01:24:31 +00:00

tuned down debug output

This commit is contained in:
postmannen 2022-02-07 11:53:49 +01:00
parent 11adae4f39
commit d748dcaec8
2 changed files with 3 additions and 3 deletions

View file

@ -605,7 +605,7 @@ func (p process) publishMessages(natsConn *nats.Conn) {
case m := <-p.subject.messageCh:
// Sign the methodArgs, and add the signature to the message.
m.ArgSignature = p.addMethodArgSignature(m)
fmt.Printf(" * DEBUG: add signature, fromNode: %v, method: %v, signature: %s\n", m.FromNode, m.Method, m.ArgSignature)
fmt.Printf(" * DEBUG: add signature, fromNode: %v, method: %v, len of signature: %v\n", m.FromNode, m.Method, len(m.ArgSignature))
p.publishAMessage(m, zEnc, once, natsConn)
case <-p.ctx.Done():

View file

@ -180,7 +180,7 @@ func (s *signatures) readKeyFile(keyFile string) (ed2519key []byte, b64Key []byt
// verifySignature
func (s *signatures) verifySignature(m Message) bool {
fmt.Printf(" * DEBUG: verifySignature, method: %v ,s contains: %v\n", m.Method, s)
fmt.Printf(" * DEBUG: verifySignature, method: %v\n", m.Method)
if s.configuration.AllowEmptySignature {
fmt.Printf(" * DEBUG: verifySignature: AllowEmptySignature set to TRUE\n")
return true
@ -190,7 +190,7 @@ func (s *signatures) verifySignature(m Message) bool {
argsStringified := argsToString(m.MethodArgs)
ok := ed25519.Verify(s.SignPublicKey, []byte(argsStringified), m.ArgSignature)
fmt.Printf(" * DEBUG: verifySignature, result: %v, fromNode: %v, method: %v, signature: %s\n", ok, m.FromNode, m.Method, m.ArgSignature)
fmt.Printf(" * DEBUG: verifySignature, result: %v, fromNode: %v, method: %v\n", ok, m.FromNode, m.Method)
return ok
}