Skip to content

Commit

Permalink
Removing BCCSP defaults usage
Browse files Browse the repository at this point in the history
This change-set does the following:
1. Removes references to BCCSP defaults opts
like SHAOpts.

This comes in the context of
https://jira.hyperledger.org/browse/FAB-2362

Change-Id: Iddcb5ded78529658f8f4327267468f191a518bc5
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
  • Loading branch information
adecaro committed Apr 7, 2017
1 parent a443a59 commit 4cf2b8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions msp/identities.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (id *identity) Verify(msg []byte, sig []byte) error {
// mspLogger.Infof("Verifying signature")

// Compute Hash
digest, err := id.msp.bccsp.Hash(msg, &bccsp.SHAOpts{})
digest, err := id.msp.bccsp.Hash(msg, &bccsp.SHA256Opts{})
if err != nil {
return fmt.Errorf("Failed computing digest [%s]", err)
}
Expand Down Expand Up @@ -170,7 +170,7 @@ func (id *signingidentity) Sign(msg []byte) ([]byte, error) {
//mspLogger.Infof("Signing message")

// Compute Hash
digest, err := id.msp.bccsp.Hash(msg, &bccsp.SHAOpts{})
digest, err := id.msp.bccsp.Hash(msg, &bccsp.SHA256Opts{})
if err != nil {
return nil, fmt.Errorf("Failed computing digest [%s]", err)
}
Expand Down
4 changes: 2 additions & 2 deletions protos/utils/txutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func GetProposalHash2(header *common.Header, ccPropPayl []byte) ([]byte, error)
return nil, fmt.Errorf("Nil arguments")
}

hash, err := factory.GetDefault().GetHash(&bccsp.SHAOpts{})
hash, err := factory.GetDefault().GetHash(&bccsp.SHA256Opts{})
if err != nil {
return nil, fmt.Errorf("Failed instantiating hash function [%s]", err)
}
Expand Down Expand Up @@ -362,7 +362,7 @@ func GetProposalHash1(header *common.Header, ccPropPayl []byte, visibility []byt
return nil, err
}

hash2, err := factory.GetDefault().GetHash(&bccsp.SHAOpts{})
hash2, err := factory.GetDefault().GetHash(&bccsp.SHA256Opts{})
if err != nil {
return nil, fmt.Errorf("Failed instantiating hash function [%s]", err)
}
Expand Down

0 comments on commit 4cf2b8f

Please sign in to comment.