Skip to content

Commit 49aa89f

Browse files
committed
Add debug prints to Sign()
Print out original plaintext and digest when in debug mode. Helps SDK developers when debugging signature issues as they can compare values on either side of gRPC Change-Id: I6286f0bf20a6ab71e72e8ddedcf167c661b41dcb Signed-off-by: tuand27613 <[email protected]>
1 parent 230f3cc commit 49aa89f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

msp/identities.go

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func (id *signingidentity) Sign(msg []byte) ([]byte, error) {
157157
return nil, fmt.Errorf("Failed computing digest [%s]", err)
158158
}
159159

160+
mspLogger.Debugf("Sign: plaintext: %X \n", msg)
161+
mspLogger.Debugf("Sign: digest: %X \n", digest)
162+
160163
// Sign
161164
return id.signer.Sign(rand.Reader, digest, nil)
162165
}

0 commit comments

Comments
 (0)