diff --git a/msp/identities.go b/msp/identities.go index 262421bfd5e..33842e9d469 100644 --- a/msp/identities.go +++ b/msp/identities.go @@ -21,8 +21,6 @@ import ( "crypto/x509" "fmt" - "encoding/asn1" - "github.com/hyperledger/fabric/core/crypto/bccsp" "github.com/hyperledger/fabric/core/crypto/bccsp/factory" "github.com/hyperledger/fabric/core/crypto/bccsp/signer" @@ -80,6 +78,7 @@ func (id *identity) VerifyAttributes(proof [][]byte, spec *AttributeProofSpec) ( } func (id *identity) Serialize() ([]byte, error) { + /* mspLogger.Infof("Serializing identity %s", id.id) // We serialize identities by prepending the MSPID and appending the ASN.1 DER content of the cert @@ -90,6 +89,8 @@ func (id *identity) Serialize() ([]byte, error) { } return idBytes, nil + */ + return id.cert.Raw, nil } type signingidentity struct { diff --git a/msp/peermspmanager.go b/msp/peermspmanager.go index 7607ac6ca40..43119692b5a 100644 --- a/msp/peermspmanager.go +++ b/msp/peermspmanager.go @@ -20,8 +20,6 @@ import ( "fmt" "sync" - "encoding/asn1" - "github.com/op/go-logging" ) @@ -139,6 +137,7 @@ func (mgr *peerMspManagerImpl) GetSigningIdentity(identifier *IdentityIdentifier } func (mgr *peerMspManagerImpl) DeserializeIdentity(serializedID []byte) (Identity, error) { + /* // We first deserialize to a SerializedIdentity to get the MSP ID sId := &SerializedIdentity{} _, err := asn1.Unmarshal(serializedID, sId) @@ -154,6 +153,8 @@ func (mgr *peerMspManagerImpl) DeserializeIdentity(serializedID []byte) (Identit // if we have this MSP, we ask it to deserialize return msp.DeserializeIdentity(sId.IdBytes) + */ + return mgr.mspsMap["DEFAULT"].DeserializeIdentity(serializedID) // FIXME! } func (mgr *peerMspManagerImpl) DeleteSigningIdentity(identifier string) (bool, error) {