Skip to content

Commit

Permalink
Add debug prints to Sign()
Browse files Browse the repository at this point in the history
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 <tdang@us.ibm.com>
  • Loading branch information
tuand27613 committed Jan 24, 2017
1 parent 230f3cc commit 49aa89f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions msp/identities.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func (id *signingidentity) Sign(msg []byte) ([]byte, error) {
return nil, fmt.Errorf("Failed computing digest [%s]", err)
}

mspLogger.Debugf("Sign: plaintext: %X \n", msg)
mspLogger.Debugf("Sign: digest: %X \n", digest)

// Sign
return id.signer.Sign(rand.Reader, digest, nil)
}
Expand Down

0 comments on commit 49aa89f

Please sign in to comment.