From 41bbdc224f8b3ec187c2b14c57716d3269831fd5 Mon Sep 17 00:00:00 2001 From: YACOVM Date: Wed, 22 Feb 2017 18:17:57 +0200 Subject: [PATCH] Remove anchor peers from CLI This change set removes the anchor peers from the CLI. and makes gossip take the organization IDs from the configuration groups of the genesis block. After this change set, the only way to get anchor peers to the peer is using the configtx tool Change-Id: I220a8a6e315fe77bc2d29c63e3d9cb2be9937247 Signed-off-by: Yacov Manevich --- .../channel/application/organization_test.go | 4 +- docs/channel-setup.md | 9 - gossip/api/channel.go | 7 +- gossip/discovery/discovery_impl.go | 5 - gossip/discovery/discovery_test.go | 2 - gossip/gossip/channel/channel.go | 6 +- gossip/gossip/channel/channel_test.go | 20 +-- gossip/gossip/gossip_impl.go | 11 +- gossip/gossip/gossip_test.go | 10 +- gossip/service/gossip_service.go | 10 +- gossip/state/state_test.go | 3 +- peer/channel/channel.go | 48 +----- peer/channel/create.go | 26 +-- peer/channel/create_test.go | 78 +++------ peer/common/anchors.go | 155 ------------------ peer/common/anchors_test.go | 60 ------- peer/common/common.go | 7 - peer/common/testdata/anchorPeersBadFormat.txt | 23 --- peer/common/testdata/anchorPeersBadPEM.txt | 23 --- peer/common/testdata/anchorPeersOrg1.txt | 23 --- protos/peer/configuration.pb.go | 29 ++-- protos/peer/configuration.proto | 3 - 22 files changed, 71 insertions(+), 491 deletions(-) delete mode 100644 peer/common/anchors.go delete mode 100644 peer/common/anchors_test.go delete mode 100644 peer/common/testdata/anchorPeersBadFormat.txt delete mode 100644 peer/common/testdata/anchorPeersBadPEM.txt delete mode 100644 peer/common/testdata/anchorPeersOrg1.txt diff --git a/common/configvalues/channel/application/organization_test.go b/common/configvalues/channel/application/organization_test.go index fb7133b1816..db1178fda38 100644 --- a/common/configvalues/channel/application/organization_test.go +++ b/common/configvalues/channel/application/organization_test.go @@ -70,8 +70,8 @@ func TestApplicationOrgRollback(t *testing.T) { func TestApplicationOrgAnchorPeers(t *testing.T) { endVal := []*pb.AnchorPeer{ - &pb.AnchorPeer{Host: "foo", Port: 234, Cert: []byte("foocert")}, - &pb.AnchorPeer{Host: "bar", Port: 237, Cert: []byte("barcert")}, + &pb.AnchorPeer{Host: "foo", Port: 234}, + &pb.AnchorPeer{Host: "bar", Port: 237}, } invalidMessage := makeInvalidConfigValue() validMessage := TemplateAnchorPeers("id", endVal) diff --git a/docs/channel-setup.md b/docs/channel-setup.md index fa5f06e4d64..ed78ce55c11 100644 --- a/docs/channel-setup.md +++ b/docs/channel-setup.md @@ -42,16 +42,7 @@ CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:5005 peer channel create -c myc1 ``` This will create a channel genesis block file `myc1.block` to issue join commands with. -If you want to specify anchor peers, you can create anchor peer files in the following format: -peer-hostname -port -PEM file of peer certificate -See CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:5005 peer channel create -h for an anchor-peer file example -And pass the anchor peer files as a comma-separated argument with flag -a: in example: -``` -CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:5005 peer channel create -c myc1 -a anchorPeer1.txt,anchorPeer2.txt -``` ### Join a channel Execute the join command to peer0 in the CLI container. diff --git a/gossip/api/channel.go b/gossip/api/channel.go index fc5db828cb7..b3abab18e18 100644 --- a/gossip/api/channel.go +++ b/gossip/api/channel.go @@ -52,9 +52,10 @@ type JoinChannelMessage interface { // AnchorPeer is an anchor peer's certificate and endpoint (host:port) type AnchorPeer struct { - Cert PeerIdentityType // Cert defines the certificate of the remote peer - Host string // Host is the hostname/ip address of the remote peer - Port int // Port is the port the remote peer is listening on + Host string // Host is the hostname/ip address of the remote peer + Port int // Port is the port the remote peer is listening on + OrgID OrgIdentityType // OrgID is the identity of the organization the anchor peer came from + } // OrgIdentityType defines the identity of an organization diff --git a/gossip/discovery/discovery_impl.go b/gossip/discovery/discovery_impl.go index 853d3316f61..95620ffaeaf 100644 --- a/gossip/discovery/discovery_impl.go +++ b/gossip/discovery/discovery_impl.go @@ -131,11 +131,6 @@ func (d *gossipDiscoveryImpl) Connect(member NetworkMember) { d.logger.Debug("Entering", member) defer d.logger.Debug("Exiting") - if member.PKIid == nil { - d.logger.Warning("Empty PkiID, aborting") - return - } - d.lock.Lock() defer d.lock.Unlock() diff --git a/gossip/discovery/discovery_test.go b/gossip/discovery/discovery_test.go index 7b403be8a8b..37b8815c963 100644 --- a/gossip/discovery/discovery_test.go +++ b/gossip/discovery/discovery_test.go @@ -274,8 +274,6 @@ func TestConnect(t *testing.T) { endpoint := fmt.Sprintf("localhost:%d", 7611+j) netMember2Connect2 := NetworkMember{Endpoint: endpoint, PKIid: []byte(endpoint)} inst.Connect(netMember2Connect2) - // Check passing nil PKI-ID doesn't crash peer - inst.Connect(NetworkMember{PKIid: nil, Endpoint: endpoint}) } fullMembership := func() bool { diff --git a/gossip/gossip/channel/channel.go b/gossip/gossip/channel/channel.go index 0774ad09529..bae4ad1c991 100644 --- a/gossip/gossip/channel/channel.go +++ b/gossip/gossip/channel/channel.go @@ -339,11 +339,7 @@ func (gc *gossipChannel) ConfigureChannel(joinMsg api.JoinChannelMessage) { orgs := []api.OrgIdentityType{} existingOrgInJoinChanMsg := make(map[string]struct{}) for _, anchorPeer := range joinMsg.AnchorPeers() { - orgID := gc.OrgByPeerIdentity(anchorPeer.Cert) - if orgID == nil { - gc.logger.Warning("Cannot extract org identity from certificate, aborting.") - return - } + orgID := anchorPeer.OrgID if _, exists := existingOrgInJoinChanMsg[string(orgID)]; !exists { orgs = append(orgs, orgID) existingOrgInJoinChanMsg[string(orgID)] = struct{}{} diff --git a/gossip/gossip/channel/channel_test.go b/gossip/gossip/channel/channel_test.go index 3a683eafad7..7f7b8394f78 100644 --- a/gossip/gossip/channel/channel_test.go +++ b/gossip/gossip/channel/channel_test.go @@ -55,12 +55,11 @@ func init() { var ( // Organizations: {ORG1, ORG2} // Channel A: {ORG1} - channelA = common.ChainID("A") - orgInChannelA = api.OrgIdentityType("ORG1") - orgNotInChannelA = api.OrgIdentityType("ORG2") - anchorPeerIdentity = api.PeerIdentityType("identityInOrg1") - pkiIDInOrg1 = common.PKIidType("pkiIDInOrg1") - pkiIDinOrg2 = common.PKIidType("pkiIDinOrg2") + channelA = common.ChainID("A") + orgInChannelA = api.OrgIdentityType("ORG1") + orgNotInChannelA = api.OrgIdentityType("ORG2") + pkiIDInOrg1 = common.PKIidType("pkiIDInOrg1") + pkiIDinOrg2 = common.PKIidType("pkiIDinOrg2") ) type joinChanMsg struct { @@ -83,7 +82,7 @@ func (jcm *joinChanMsg) AnchorPeers() []api.AnchorPeer { if jcm.anchorPeers != nil { return jcm.anchorPeers() } - return []api.AnchorPeer{{Cert: anchorPeerIdentity}} + return []api.AnchorPeer{{OrgID: orgInChannelA}} } type cryptoService struct { @@ -200,7 +199,6 @@ func (ga *gossipAdapterMock) GetOrgOfPeer(PKIIID common.PKIidType) api.OrgIdenti func configureAdapter(adapter *gossipAdapterMock, members ...discovery.NetworkMember) { adapter.On("GetConf").Return(conf) adapter.On("GetMembership").Return(members) - adapter.On("OrgByPeerIdentity", anchorPeerIdentity).Return(orgInChannelA) adapter.On("GetOrgOfPeer", pkiIDInOrg1).Return(orgInChannelA) adapter.On("GetOrgOfPeer", pkiIDinOrg2).Return(orgNotInChannelA) adapter.On("GetOrgOfPeer", mock.Anything).Return(api.OrgIdentityType(nil)) @@ -704,7 +702,7 @@ func TestChannelReconfigureChannel(t *testing.T) { outdatedJoinChanMsg := &joinChanMsg{ anchorPeers: func() []api.AnchorPeer { - return []api.AnchorPeer{{Cert: api.PeerIdentityType(orgNotInChannelA)}} + return []api.AnchorPeer{{OrgID: orgNotInChannelA}} }, getTS: func() time.Time { return time.Now() @@ -713,7 +711,7 @@ func TestChannelReconfigureChannel(t *testing.T) { newJoinChanMsg := &joinChanMsg{ anchorPeers: func() []api.AnchorPeer { - return []api.AnchorPeer{{Cert: api.PeerIdentityType(orgInChannelA)}} + return []api.AnchorPeer{{OrgID: orgInChannelA}} }, getTS: func() time.Time { return time.Now().Add(time.Millisecond * 100) @@ -722,7 +720,7 @@ func TestChannelReconfigureChannel(t *testing.T) { updatedJoinChanMsg := &joinChanMsg{ anchorPeers: func() []api.AnchorPeer { - return []api.AnchorPeer{{Cert: api.PeerIdentityType(orgNotInChannelA)}} + return []api.AnchorPeer{{OrgID: orgNotInChannelA}} }, getTS: func() time.Time { return time.Now().Add(time.Millisecond * 200) diff --git a/gossip/gossip/gossip_impl.go b/gossip/gossip/gossip_impl.go index 5b0aced6c54..7a1e0cf65ff 100644 --- a/gossip/gossip/gossip_impl.go +++ b/gossip/gossip/gossip_impl.go @@ -184,7 +184,6 @@ func (g *gossipServiceImpl) JoinChan(joinMsg api.JoinChannelMessage, chainID com // joinMsg is supposed to have been already verified g.chanState.joinChannel(joinMsg, chainID) - selfPkiID := g.mcs.GetPKIidOfCert(g.selfIdentity) for _, ap := range joinMsg.AnchorPeers() { if ap.Host == "" { g.logger.Warning("Got empty hostname, skipping connecting to anchor peer", ap) @@ -194,15 +193,15 @@ func (g *gossipServiceImpl) JoinChan(joinMsg api.JoinChannelMessage, chainID com g.logger.Warning("Got invalid port (0), skipping connecting to anchor peer", ap) continue } - pkiID := g.mcs.GetPKIidOfCert(ap.Cert) + endpoint := fmt.Sprintf("%s:%d", ap.Host, ap.Port) // Skip connecting to self - if bytes.Equal([]byte(pkiID), []byte(selfPkiID)) { - g.logger.Info("Anchor peer with same PKI-ID, skipping connecting to myself") + if g.selfNetworkMember().Endpoint == endpoint || g.selfNetworkMember().InternalEndpoint.Endpoint == endpoint { + g.logger.Info("Anchor peer with same endpoint, skipping connecting to myself") continue } - endpoint := fmt.Sprintf("%s:%d", ap.Host, ap.Port) + g.disc.Connect(discovery.NetworkMember{ - InternalEndpoint: &proto.SignedEndpoint{Endpoint: endpoint}, PKIid: pkiID}) + InternalEndpoint: &proto.SignedEndpoint{Endpoint: endpoint}}) } } diff --git a/gossip/gossip/gossip_test.go b/gossip/gossip/gossip_test.go index 187aafa0187..7de9da17ea0 100644 --- a/gossip/gossip/gossip_test.go +++ b/gossip/gossip/gossip_test.go @@ -53,7 +53,6 @@ func init() { } var orgInChannelA = api.OrgIdentityType("ORG1") -var anchorPeerIdentity = api.PeerIdentityType("identityInOrg1") func acceptData(m interface{}) bool { if dataMsg := m.(*proto.GossipMessage).GetDataMsg(); dataMsg != nil { @@ -82,7 +81,7 @@ func (*joinChanMsg) SequenceNumber() uint64 { // AnchorPeers returns all the anchor peers that are in the channel func (jcm *joinChanMsg) AnchorPeers() []api.AnchorPeer { if len(jcm.anchorPeers) == 0 { - return []api.AnchorPeer{{Cert: anchorPeerIdentity}} + return []api.AnchorPeer{{OrgID: orgInChannelA}} } return jcm.anchorPeers } @@ -317,11 +316,10 @@ func TestConnectToAnchorPeers(t *testing.T) { jcm := &joinChanMsg{anchorPeers: []api.AnchorPeer{}} for i := 0; i < n; i++ { - pkiID := fmt.Sprintf("localhost:%d", portPrefix+i) ap := api.AnchorPeer{ - Port: portPrefix + i, - Host: "localhost", - Cert: []byte(pkiID), + Port: portPrefix + i, + Host: "localhost", + OrgID: orgInChannelA, } jcm.anchorPeers = append(jcm.anchorPeers, ap) } diff --git a/gossip/service/gossip_service.go b/gossip/service/gossip_service.go index 056f8db8ae7..a2f90cc4144 100644 --- a/gossip/service/gossip_service.go +++ b/gossip/service/gossip_service.go @@ -177,12 +177,12 @@ func (g *gossipServiceImpl) InitializeChannel(chainID string, committer committe // configUpdated constructs a joinChannelMessage and sends it to the gossipSvc func (g *gossipServiceImpl) configUpdated(config Config) { jcm := &joinChannelMessage{seqNum: config.Sequence(), anchorPeers: []api.AnchorPeer{}} - for _, org := range config.Organizations() { - for _, ap := range org.AnchorPeers() { + for orgID, appOrg := range config.Organizations() { + for _, ap := range appOrg.AnchorPeers() { anchorPeer := api.AnchorPeer{ - Host: ap.Host, - Port: int(ap.Port), - Cert: api.PeerIdentityType(ap.Cert), + Host: ap.Host, + Port: int(ap.Port), + OrgID: api.OrgIdentityType(orgID), } jcm.anchorPeers = append(jcm.anchorPeers, anchorPeer) } diff --git a/gossip/state/state_test.go b/gossip/state/state_test.go index 8acb318db6a..de2de563ba7 100644 --- a/gossip/state/state_test.go +++ b/gossip/state/state_test.go @@ -48,7 +48,6 @@ var ( ) var orgID = []byte("ORG1") -var anchorPeerIdentity = api.PeerIdentityType("identityInOrg1") type joinChanMsg struct { } @@ -61,7 +60,7 @@ func (*joinChanMsg) SequenceNumber() uint64 { // AnchorPeers returns all the anchor peers that are in the channel func (*joinChanMsg) AnchorPeers() []api.AnchorPeer { - return []api.AnchorPeer{{Cert: anchorPeerIdentity}} + return []api.AnchorPeer{{OrgID: orgID}} } type orgCryptoService struct { diff --git a/peer/channel/channel.go b/peer/channel/channel.go index 0a38c363ffb..ddb4156667a 100644 --- a/peer/channel/channel.go +++ b/peer/channel/channel.go @@ -39,9 +39,8 @@ var ( genesisBlockPath string // create related variables - chainID string - anchorPeerList string - channelTxFile string + chainID string + channelTxFile string ) // Cmd returns the cobra command for Node @@ -66,7 +65,6 @@ func AddFlags(cmd *cobra.Command) { flags.StringVarP(&genesisBlockPath, "blockpath", "b", common.UndefinedParamValue, "Path to file containing genesis block") flags.StringVarP(&chainID, "chain", "c", common.UndefinedParamValue, "In case of a newChain command, the chain ID to create.") - flags.StringVarP(&anchorPeerList, "anchors", "a", "", anchorPeerUsage) flags.StringVarP(&channelTxFile, "file", "f", "", "Configuration transaction file generated by a tool such as configtxgen for submitting to orderer") } @@ -78,11 +76,10 @@ var channelCmd = &cobra.Command{ // ChannelCmdFactory holds the clients used by ChannelCmdFactory type ChannelCmdFactory struct { - EndorserClient pb.EndorserClient - Signer msp.SigningIdentity - BroadcastClient common.BroadcastClient - DeliverClient deliverClientIntf - AnchorPeerParser *common.AnchorPeerParser + EndorserClient pb.EndorserClient + Signer msp.SigningIdentity + BroadcastClient common.BroadcastClient + DeliverClient deliverClientIntf } // InitCmdFactory init the ChannelCmdFactor with default clients @@ -121,40 +118,7 @@ func InitCmdFactory(isOrdererRequired bool) (*ChannelCmdFactory, error) { } cmdFact.DeliverClient = newDeliverClient(client, chainID) - cmdFact.AnchorPeerParser = common.GetAnchorPeersParser(anchorPeerList) } return cmdFact, nil } - -const anchorPeerUsage = `In case of a newChain command, the list of anchor peer files, separated by commas. - The files should be in the following format: - anchorPeerHost - anchorPeerPort - PEM encoded certificate. - - In example: - 1.2.3.4 - 7051 - -----BEGIN CERTIFICATE----- - MIIDXTCCAkWgAwIBAgIJALRf63iSHa0BMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV - BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTcwMTI2MjMyMzM1WhcNMTgwMTI2MjMyMzM1WjBF - MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAzbph0SEHYb/tvNYATWfpl7oAFpw3Tcn2s0icJaScqs2RodjosIOBK6AB - N6fkgGDHwYhYbMNfJzUYSYgXD4MPjDxzPw+/Hz02bjuxFB8pQnmln6b6pVHz79vL - i3UQ8eaCe3zswpX0JJTlOs5wdJGOySNRNatbVKl9HDNWcNl6Ec5MrlK3/v6OGF03 - 0ak7QYDNjyHaz3rMaOzJumRJeOxtjUO/+TbjN+bkcXSgQH9LjoeaZdkV/QWrCA1I - qGowBOxYcyiX56bKKFvCZ76ZYA55d3HyI/H7S258CTdE6WUTDXNqmXnX5WbBuUiK - dypI+KmGlzrRETahrJSJKdlxxtpPVwIDAQABo1AwTjAdBgNVHQ4EFgQUnK6ITmnz - hfNKFr+57Bcayzio47EwHwYDVR0jBBgwFoAUnK6ITmnzhfNKFr+57Bcayzio47Ew - DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAvYFu4xQDE11C8wdK/5LE - G61E9yjsDjFlhzgsG8+TqWI6LjHzm3hSNj7VMI7f0ckydxxOSQqKEkkQaL5GNS3B - JOwsGtPjgQ2Sxx2KrEyaNozxznm1qZflQCis95NVvjHeiybbLfjQRVKde0+7kSKc - cqBBE+IwxNofNyevlRyCBNsH6v2DLJoiFwvE5PqY6XvAcC17va/TKS16TVCqpxX0 - OrngleEKom1hiU1MzGZ29/nGpwP/oD8Lf+BqxipLf3BdiDR2+n5dbrV/ul1VczwQ - F2ht++pZbdiqmv7CRAfvkSzrkwIeL+XfVR6ncFf4Nf92u6DJDnTzc/0K3pLaE+bo - JQ== - -----END CERTIFICATE----- -` diff --git a/peer/channel/create.go b/peer/channel/create.go index dac4df7017a..2be19d0a412 100644 --- a/peer/channel/create.go +++ b/peer/channel/create.go @@ -22,12 +22,9 @@ import ( "time" "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric/common/configtx" configtxtest "github.com/hyperledger/fabric/common/configtx/test" "github.com/hyperledger/fabric/common/configtx/tool/provisional" - configtxapplication "github.com/hyperledger/fabric/common/configvalues/channel/application" - "github.com/hyperledger/fabric/common/configvalues/msp" mspmgmt "github.com/hyperledger/fabric/msp/mgmt" "github.com/hyperledger/fabric/peer/common" cb "github.com/hyperledger/fabric/protos/common" @@ -63,32 +60,11 @@ func createCmd(cf *ChannelCmdFactory) *cobra.Command { } func createChannelFromDefaults(cf *ChannelCmdFactory) (*cb.Envelope, error) { - if cf.AnchorPeerParser == nil { - cf.AnchorPeerParser = common.GetDefaultAnchorPeerParser() - } - - anchorPeers, err := cf.AnchorPeerParser.Parse() - if err != nil { - return nil, err - } - oTemplate := configtxtest.OrdererTemplate() oOrgTemplate := configtxtest.OrdererOrgTemplate() appOrgTemplate := configtxtest.ApplicationOrgTemplate() - gosscg := configtxapplication.TemplateAnchorPeers("XXXFakeOrg", anchorPeers) - - // FIXME: remove this hack as soon as 'peer channel create' is fixed properly - // we add admin policies for this config group, otherwise a majority won't be reached - p := &cb.ConfigPolicy{ - Policy: &cb.Policy{ - Type: int32(cb.Policy_SIGNATURE), - Policy: cauthdsl.MarshaledAcceptAllPolicy, - }, - } - gosscg.Groups[configtxapplication.GroupKey].Groups["XXXFakeOrg"].Policies[msp.AdminsPolicyKey] = p - gossTemplate := configtx.NewSimpleTemplate(gosscg) - chCrtTemp := configtx.NewCompositeTemplate(oTemplate, oOrgTemplate, appOrgTemplate, gossTemplate) + chCrtTemp := configtx.NewCompositeTemplate(oTemplate, oOrgTemplate, appOrgTemplate) signer, err := mspmgmt.GetLocalMSP().GetDefaultSigningIdentity() if err != nil { diff --git a/peer/channel/create_test.go b/peer/channel/create_test.go index 907005d8ba7..783272cea07 100644 --- a/peer/channel/create_test.go +++ b/peer/channel/create_test.go @@ -92,17 +92,16 @@ func TestCreateChain(t *testing.T) { mockBroadcastClient := common.GetMockBroadcastClient(nil) mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersOrg1.txt"), + BroadcastClient: mockBroadcastClient, + Signer: signer, + DeliverClient: &mockDeliverClient{}, } cmd := createCmd(mockCF) AddFlags(cmd) - args := []string{"-c", mockchain, "-a", "../common/testdata/anchorPeersOrg1.txt"} + args := []string{"-c", mockchain} cmd.SetArgs(args) if err := cmd.Execute(); err != nil { @@ -144,39 +143,6 @@ func TestCreateChainWithDefaultAnchorPeers(t *testing.T) { } } -func TestCreateChainInvalidAnchorPeers(t *testing.T) { - InitMSP() - - mockchain := "mockchain" - - defer os.Remove(mockchain + ".block") - - signer, err := common.GetDefaultSigner() - if err != nil { - t.Fatalf("Get default signer error: %v", err) - } - - mockBroadcastClient := common.GetMockBroadcastClient(nil) - - mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersBadPEM.txt"), - } - - cmd := createCmd(mockCF) - - AddFlags(cmd) - - args := []string{"-c", mockchain, "-a", "../common/testdata/anchorPeersBadPEM.txt"} - cmd.SetArgs(args) - - if err := cmd.Execute(); err == nil { - t.Errorf("expected create chain to fail because of invalid anchor peer file") - } -} - func TestCreateChainBCFail(t *testing.T) { InitMSP() @@ -193,17 +159,16 @@ func TestCreateChainBCFail(t *testing.T) { mockBroadcastClient := common.GetMockBroadcastClient(sendErr) mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersOrg1.txt"), + BroadcastClient: mockBroadcastClient, + Signer: signer, + DeliverClient: &mockDeliverClient{}, } cmd := createCmd(mockCF) AddFlags(cmd) - args := []string{"-c", mockchain, "-a", "../common/testdata/anchorPeersOrg1.txt"} + args := []string{"-c", mockchain} cmd.SetArgs(args) expectedErrMsg := sendErr.Error() @@ -233,17 +198,16 @@ func TestCreateChainDeliverFail(t *testing.T) { recvErr := fmt.Errorf("deliver create tx failed") mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{recvErr}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersOrg1.txt"), + BroadcastClient: mockBroadcastClient, + Signer: signer, + DeliverClient: &mockDeliverClient{recvErr}, } cmd := createCmd(mockCF) AddFlags(cmd) - args := []string{"-c", mockchain, "-a", "../common/testdata/anchorPeersOrg1.txt"} + args := []string{"-c", mockchain} cmd.SetArgs(args) expectedErrMsg := recvErr.Error() @@ -307,17 +271,16 @@ func TestCreateChainFromTx(t *testing.T) { mockBroadcastClient := common.GetMockBroadcastClient(nil) mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersOrg1.txt"), + BroadcastClient: mockBroadcastClient, + Signer: signer, + DeliverClient: &mockDeliverClient{}, } cmd := createCmd(mockCF) AddFlags(cmd) - args := []string{"-c", mockchannel, "-f", file, "-a", "../common/testdata/anchorPeersOrg1.txt"} + args := []string{"-c", mockchannel, "-f", file} cmd.SetArgs(args) if _, err = createTxFile(file, cb.HeaderType_CONFIG_UPDATE, mockchannel); err != nil { @@ -354,17 +317,16 @@ func TestCreateChainInvalidTx(t *testing.T) { mockBroadcastClient := common.GetMockBroadcastClient(nil) mockCF := &ChannelCmdFactory{ - BroadcastClient: mockBroadcastClient, - Signer: signer, - DeliverClient: &mockDeliverClient{}, - AnchorPeerParser: common.GetAnchorPeersParser("../common/testdata/anchorPeersOrg1.txt"), + BroadcastClient: mockBroadcastClient, + Signer: signer, + DeliverClient: &mockDeliverClient{}, } cmd := createCmd(mockCF) AddFlags(cmd) - args := []string{"-c", mockchannel, "-f", file, "-a", "../common/testdata/anchorPeersOrg1.txt"} + args := []string{"-c", mockchannel, "-f", file} cmd.SetArgs(args) //bad type CONFIG diff --git a/peer/common/anchors.go b/peer/common/anchors.go deleted file mode 100644 index cb71d167e30..00000000000 --- a/peer/common/anchors.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright IBM Corp. 2017 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package common - -import ( - "bufio" - "crypto/x509" - "encoding/pem" - "fmt" - "os" - "strconv" - "strings" - - "github.com/hyperledger/fabric/msp" - "github.com/hyperledger/fabric/protos/peer" - "github.com/spf13/viper" -) - -type AnchorPeerParser struct { - anchorPeerParam string - defaultAnchorPeers []*peer.AnchorPeer -} - -func (app *AnchorPeerParser) Parse() ([]*peer.AnchorPeer, error) { - if app.defaultAnchorPeers != nil { - return app.defaultAnchorPeers, nil - } - return loadAnchorPeers(app.anchorPeerParam) -} - -func GetDefaultAnchorPeerParser() *AnchorPeerParser { - anchorPeerFile := "/tmp/anchorPeer.txt" - f, err := os.Create(anchorPeerFile) - if err != nil { - panic(err) - } - defer f.Close() - defer os.Remove(anchorPeerFile) - f.Write([]byte(defaultAnchorPeerFile)) - f.Sync() - aps, err := loadAnchorPeers(anchorPeerFile) - if err != nil { - panic(err) - } - return &AnchorPeerParser{defaultAnchorPeers: aps} -} - -func loadAnchorPeers(anchorPeerParam string) ([]*peer.AnchorPeer, error) { - anchorPeerFileList := strings.Split(anchorPeerParam, ",") - for _, f := range anchorPeerFileList { - if _, err := os.Stat(f); os.IsNotExist(err) { - return nil, fmt.Errorf("File %s doesn't exist", f) - } - } - - var anchorPeers []*peer.AnchorPeer - - for _, f := range anchorPeerFileList { - if ap, err := anchorPeerFromFile(f); err != nil { - return nil, err - } else { - anchorPeers = append(anchorPeers, ap) - } - } - - return anchorPeers, nil -} - -func anchorPeerFromFile(filename string) (*peer.AnchorPeer, error) { - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer f.Close() - sc := bufio.NewScanner(f) - invalidFormatErr := fmt.Errorf("%s has invalid format", filename) - if !sc.Scan() { - return nil, invalidFormatErr - } - hostname := sc.Text() - if !sc.Scan() || len(hostname) == 0 { - return nil, invalidFormatErr - } - port, err := strconv.ParseInt(sc.Text(), 10, 64) - if err != nil { - return nil, fmt.Errorf("Second line must be a number: %d", port) - } - - var rawPEM []byte - for sc.Scan() { - line := sc.Text() - line = line + "\n" - rawPEM = append(rawPEM, []byte(line)...) - } - block, _ := pem.Decode(rawPEM) - if block == nil { - return nil, fmt.Errorf("Anchor peer certificate is not a valid PEM certificate") - } - _, err = x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, fmt.Errorf("Anchor peer certificate is not a valid PEM certificate: %v", err) - } - - // TODO: this MSP-ID isn't going to stay like that in the future, - // but right now, it's the same for everyone. - identity, err := msp.NewSerializedIdentity("DEFAULT", rawPEM) - if err != nil { - return nil, err - } - - ap := &peer.AnchorPeer{ - Host: hostname, - Port: int32(port), - Cert: identity, - } - - if viper.GetBool("peer.gossip.ignoreSecurity") { - ap.Cert = []byte(fmt.Sprintf("%s:%d", ap.Host, ap.Port)) - } - - return ap, nil -} - -const defaultAnchorPeerFile = `peer0 -7051 ------BEGIN CERTIFICATE----- -MIICjDCCAjKgAwIBAgIUBEVwsSx0TmqdbzNwleNBBzoIT0wwCgYIKoZIzj0EAwIw -fzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh -biBGcmFuY2lzY28xHzAdBgNVBAoTFkludGVybmV0IFdpZGdldHMsIEluYy4xDDAK -BgNVBAsTA1dXVzEUMBIGA1UEAxMLZXhhbXBsZS5jb20wHhcNMTYxMTExMTcwNzAw -WhcNMTcxMTExMTcwNzAwWjBjMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGgg -Q2Fyb2xpbmExEDAOBgNVBAcTB1JhbGVpZ2gxGzAZBgNVBAoTEkh5cGVybGVkZ2Vy -IEZhYnJpYzEMMAoGA1UECxMDQ09QMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE -HBuKsAO43hs4JGpFfiGMkB/xsILTsOvmN2WmwpsPHZNL6w8HWe3xCPQtdG/XJJvZ -+C756KEsUBM3yw5PTfku8qOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYw -FAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOFC -dcUZ4es3ltiCgAVDoyLfVpPIMB8GA1UdIwQYMBaAFBdnQj2qnoI/xMUdn1vDmdG1 -nEgQMCUGA1UdEQQeMByCCm15aG9zdC5jb22CDnd3dy5teWhvc3QuY29tMAoGCCqG -SM49BAMCA0gAMEUCIDf9Hbl4xn3z4EwNKmilM9lX2Fq4jWpAaRVB97OmVEeyAiEA -25aDPQHGGq2AvhKT0wvt08cX1GTGCIbfmuLpMwKQj38= ------END CERTIFICATE-----` diff --git a/peer/common/anchors_test.go b/peer/common/anchors_test.go deleted file mode 100644 index ea42976e7c5..00000000000 --- a/peer/common/anchors_test.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright IBM Corp. 2017 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package common - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestAnchorPeersFilesNotExists(t *testing.T) { - ap, err := loadAnchorPeers("suchAFileShouldntExist.txt") - assert.Nil(t, ap) - assert.Error(t, err) -} - -func TestAnchorPeersValid(t *testing.T) { - ap, err := loadAnchorPeers("testdata/anchorPeersOrg1.txt") - assert.NotNil(t, ap) - assert.NoError(t, err) -} - -func TestAnchorPeersFileBadPEM(t *testing.T) { - ap, err := loadAnchorPeers("testdata/anchorPeersBadPEM.txt") - assert.Nil(t, ap) - assert.Error(t, err) -} - -func TestAnchorPeersFileBadFormat(t *testing.T) { - ap, err := loadAnchorPeers("testdata/anchorPeersBadFormat.txt") - assert.Nil(t, ap) - assert.Error(t, err) -} - -func TestAnchorPeersMultiple(t *testing.T) { - fileList := "testdata/anchorPeersBadPEM.txt,testdata/anchorPeersOrg1.txt" - ap, err := loadAnchorPeers(fileList) - assert.Nil(t, ap) - assert.Error(t, err) - - fileList = "testdata/anchorPeersOrg1.txt,testdata/anchorPeersOrg1.txt" - ap, err = loadAnchorPeers(fileList) - assert.NotNil(t, ap) - assert.NoError(t, err) - assert.Len(t, ap, 2) -} diff --git a/peer/common/common.go b/peer/common/common.go index 8d779590da6..277f3b60a98 100644 --- a/peer/common/common.go +++ b/peer/common/common.go @@ -88,13 +88,6 @@ func GetEndorserClient() (pb.EndorserClient, error) { return endorserClient, nil } -func GetAnchorPeersParser(anchorPeerParam string) *AnchorPeerParser { - if len(anchorPeerParam) == 0 { - return GetDefaultAnchorPeerParser() - } - return &AnchorPeerParser{anchorPeerParam: anchorPeerParam} -} - // GetAdminClient returns a new admin client connection for this peer func GetAdminClient() (pb.AdminClient, error) { clientConn, err := peer.NewPeerClientConnection() diff --git a/peer/common/testdata/anchorPeersBadFormat.txt b/peer/common/testdata/anchorPeersBadFormat.txt deleted file mode 100644 index dfaefa9c3d4..00000000000 --- a/peer/common/testdata/anchorPeersBadFormat.txt +++ /dev/null @@ -1,23 +0,0 @@ -7051 -1.2.3.4 ------BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJALRf63iSHa0BMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTcwMTI2MjMyMzM1WhcNMTgwMTI2MjMyMzM1WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAzbph0SEHYb/tvNYATWfpl7oAFpw3Tcn2s0icJaScqs2RodjosIOBK6AB -N6fkgGDHwYhYbMNfJzUYSYgXD4MPjDxzPw+/Hz02bjuxFB8pQnmln6b6pVHz79vL -i3UQ8eaCe3zswpX0JJTlOs5wdJGOySNRNatbVKl9HDNWcNl6Ec5MrlK3/v6OGF03 -0ak7QYDNjyHaz3rMaOzJumRJeOxtjUO/+TbjN+bkcXSgQH9LjoeaZdkV/QWrCA1I -qGowBOxYcyiX56bKKFvCZ76ZYA55d3HyI/H7S258CTdE6WUTDXNqmXnX5WbBuUiK -dypI+KmGlzrRETahrJSJKdlxxtpPVwIDAQABo1AwTjAdBgNVHQ4EFgQUnK6ITmnz -hfNKFr+57Bcayzio47EwHwYDVR0jBBgwFoAUnK6ITmnzhfNKFr+57Bcayzio47Ew -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAvYFu4xQDE11C8wdK/5LE -G61E9yjsDjFlhzgsG8+TqWI6LjHzm3hSNj7VMI7f0ckydxxOSQqKEkkQaL5GNS3B -JOwsGtPjgQ2Sxx2KrEyaNozxznm1qZflQCis95NVvjHeiybbLfjQRVKde0+7kSKc -cqBBE+IwxNofNyevlRyCBNsH6v2DLJoiFwvE5PqY6XvAcC17va/TKS16TVCqpxX0 -OrngleEKom1hiU1MzGZ29/nGpwP/oD8Lf+BqxipLf3BdiDR2+n5dbrV/ul1VczwQ -F2ht++pZbdiqmv7CRAfvkSzrkwIeL+XfVR6ncFf4Nf92u6DJDnTzc/0K3pLaE+bo -JQ== ------END CERTIFICATE----- diff --git a/peer/common/testdata/anchorPeersBadPEM.txt b/peer/common/testdata/anchorPeersBadPEM.txt deleted file mode 100644 index a520d721468..00000000000 --- a/peer/common/testdata/anchorPeersBadPEM.txt +++ /dev/null @@ -1,23 +0,0 @@ -1.2.3.4 -7051 ------BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJALRf63iSHa0BMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV -AYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTcwMTI2MjMyMzM1WhcNMTgwMTI2MjMyMzM1WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAzbph0SEHYb/tvNYATWfpl7oAFpw3Tcn2s0icJaScqs2RodjosIOBK6AB -N6fkgGDHwYhYbMNfJzUYSYgXD4MPjDxzPw+/Hz02bjuxFB8pQnmln6b6pVHz79vL -i3UQ8eaCe3zswpX0JJTlOs5wdJGOySNRNatbVKl9HDNWcNl6Ec5MrlK3/v6OGF03 -0ak7QYDNjyHaz3rMaOzJumRJeOxtjUO/+TbjN+bkcXSgQH9LjoeaZdkV/QWrCA1I -qGowBOxYcyiX56bKKFvCZ76ZYA55d3HyI/H7S258CTdE6WUTDXNqmXnX5WbBuUiK -dypI+KmGlzrRETahrJSJKdlxxtpPVwIDAQABo1AwTjAdBgNVHQ4EFgQUnK6ITmnz -hfNKFr+57Bcayzio47EwHwYDVR0jBBgwFoAUnK6ITmnzhfNKFr+57Bcayzio47Ew -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAvYFu4xQDE11C8wdK/5LE -G61E9yjsDjFlhzgsG8+TqWI6LjHzm3hSNj7VMI7f0ckydxxOSQqKEkkQaL5GNS3B -JOwsGtPjgQ2Sxx2KrEyaNozxznm1qZflQCis95NVvjHeiybbLfjQRVKde0+7kSKc -cqBBE+IwxNofNyevlRyCBNsH6v2DLJoiFwvE5PqY6XvAcC17va/TKS16TVCqpxX0 -OrngleEKom1hiU1MzGZ29/nGpwP/oD8Lf+BqxipLf3BdiDR2+n5dbrV/ul1VczwQ -F2ht++pZbdiqmv7CRAfvkSzrkwIeL+XfVR6ncFf4Nf92u6DJDnTzc/0K3pLaE+bo -JQ== ------END CERTIFICATE----- diff --git a/peer/common/testdata/anchorPeersOrg1.txt b/peer/common/testdata/anchorPeersOrg1.txt deleted file mode 100644 index e817b09f0e7..00000000000 --- a/peer/common/testdata/anchorPeersOrg1.txt +++ /dev/null @@ -1,23 +0,0 @@ -1.2.3.4 -7051 ------BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJALRf63iSHa0BMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTcwMTI2MjMyMzM1WhcNMTgwMTI2MjMyMzM1WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAzbph0SEHYb/tvNYATWfpl7oAFpw3Tcn2s0icJaScqs2RodjosIOBK6AB -N6fkgGDHwYhYbMNfJzUYSYgXD4MPjDxzPw+/Hz02bjuxFB8pQnmln6b6pVHz79vL -i3UQ8eaCe3zswpX0JJTlOs5wdJGOySNRNatbVKl9HDNWcNl6Ec5MrlK3/v6OGF03 -0ak7QYDNjyHaz3rMaOzJumRJeOxtjUO/+TbjN+bkcXSgQH9LjoeaZdkV/QWrCA1I -qGowBOxYcyiX56bKKFvCZ76ZYA55d3HyI/H7S258CTdE6WUTDXNqmXnX5WbBuUiK -dypI+KmGlzrRETahrJSJKdlxxtpPVwIDAQABo1AwTjAdBgNVHQ4EFgQUnK6ITmnz -hfNKFr+57Bcayzio47EwHwYDVR0jBBgwFoAUnK6ITmnzhfNKFr+57Bcayzio47Ew -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAvYFu4xQDE11C8wdK/5LE -G61E9yjsDjFlhzgsG8+TqWI6LjHzm3hSNj7VMI7f0ckydxxOSQqKEkkQaL5GNS3B -JOwsGtPjgQ2Sxx2KrEyaNozxznm1qZflQCis95NVvjHeiybbLfjQRVKde0+7kSKc -cqBBE+IwxNofNyevlRyCBNsH6v2DLJoiFwvE5PqY6XvAcC17va/TKS16TVCqpxX0 -OrngleEKom1hiU1MzGZ29/nGpwP/oD8Lf+BqxipLf3BdiDR2+n5dbrV/ul1VczwQ -F2ht++pZbdiqmv7CRAfvkSzrkwIeL+XfVR6ncFf4Nf92u6DJDnTzc/0K3pLaE+bo -JQ== ------END CERTIFICATE----- \ No newline at end of file diff --git a/protos/peer/configuration.pb.go b/protos/peer/configuration.pb.go index 69f2bfa6bc5..50ea86db67e 100644 --- a/protos/peer/configuration.pb.go +++ b/protos/peer/configuration.pb.go @@ -37,9 +37,6 @@ type AnchorPeer struct { Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"` // The port number Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` - // SSL certificate to be used to maintain mutual TLS - // connection with anchor peer - Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"` } func (m *AnchorPeer) Reset() { *m = AnchorPeer{} } @@ -55,17 +52,17 @@ func init() { func init() { proto.RegisterFile("peer/configuration.proto", fileDescriptor4) } var fileDescriptor4 = []byte{ - // 191 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0x8f, 0x31, 0x4f, 0xc6, 0x20, - 0x10, 0x86, 0x83, 0x55, 0x13, 0x69, 0x27, 0x26, 0x46, 0xd2, 0x09, 0x63, 0x52, 0x12, 0x8d, 0x3f, - 0x40, 0xe3, 0xe0, 0x68, 0x18, 0x5d, 0x0c, 0xc5, 0x6b, 0x21, 0xd1, 0x1e, 0x39, 0xe8, 0xf0, 0xfd, - 0xfb, 0x2f, 0xd0, 0xa1, 0x13, 0x0f, 0xef, 0xdd, 0x93, 0xbc, 0xc7, 0x65, 0x02, 0x20, 0xe3, 0x71, - 0x5b, 0xe2, 0xba, 0x93, 0x2b, 0x11, 0xb7, 0x29, 0x11, 0x16, 0x14, 0xf7, 0xed, 0xc9, 0xe3, 0x07, - 0xef, 0xdf, 0x36, 0x1f, 0x90, 0xbe, 0x00, 0x28, 0x8b, 0x57, 0x3e, 0xb8, 0xf6, 0xfd, 0xa9, 0x66, - 0x96, 0x4c, 0x75, 0xba, 0x7f, 0x16, 0x87, 0x94, 0xa7, 0x73, 0xd5, 0xf6, 0xee, 0xd4, 0xc6, 0x4f, - 0xce, 0xcf, 0x91, 0x10, 0xfc, 0x36, 0x60, 0x2e, 0x92, 0x29, 0xa6, 0x1f, 0x6c, 0xe3, 0x9a, 0x25, - 0xa4, 0x22, 0x6f, 0x14, 0xd3, 0x77, 0xb6, 0x71, 0xcd, 0x3c, 0x50, 0x91, 0x9d, 0x62, 0x7a, 0xb0, - 0x8d, 0xdf, 0x9f, 0xbe, 0x1f, 0xd7, 0x58, 0xc2, 0x3e, 0x4f, 0x1e, 0xff, 0x4d, 0xb8, 0x24, 0xa0, - 0x3f, 0xf8, 0x5d, 0x81, 0xcc, 0xe2, 0x66, 0x8a, 0xde, 0x1c, 0x4d, 0x4c, 0xad, 0x37, 0x1f, 0x47, - 0xbc, 0x5c, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x2c, 0x85, 0xf6, 0xe7, 0x00, 0x00, 0x00, + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0x8e, 0xbd, 0x0a, 0xc2, 0x30, + 0x10, 0xc7, 0x89, 0x5f, 0x60, 0xea, 0x94, 0x29, 0x63, 0xe9, 0x54, 0x11, 0x1a, 0xf0, 0xe3, 0x01, + 0x14, 0x1f, 0x40, 0x3a, 0xba, 0x48, 0x1a, 0xaf, 0x4d, 0x40, 0x7b, 0xe1, 0x92, 0x0e, 0xbe, 0xbd, + 0x34, 0x1d, 0x3a, 0xdd, 0xff, 0x3e, 0x7e, 0xdc, 0x8f, 0x4b, 0x0f, 0x40, 0xca, 0x60, 0xdf, 0xba, + 0x6e, 0x20, 0x1d, 0x1d, 0xf6, 0x95, 0x27, 0x8c, 0x28, 0x36, 0xa9, 0x84, 0xe2, 0xce, 0xb3, 0x6b, + 0x6f, 0x2c, 0xd2, 0x03, 0x80, 0x82, 0xb8, 0xf0, 0x9d, 0x4e, 0xed, 0x6b, 0x24, 0x83, 0x64, 0xf9, + 0xb2, 0xcc, 0x8e, 0x62, 0x82, 0x42, 0x35, 0x9f, 0xd6, 0x99, 0x9e, 0xb1, 0xe2, 0xcc, 0xf9, 0xbc, + 0x12, 0x82, 0xaf, 0x2c, 0x86, 0x28, 0x59, 0xce, 0xca, 0x6d, 0x9d, 0xf2, 0x38, 0xf3, 0x48, 0x51, + 0x2e, 0x72, 0x56, 0xae, 0xeb, 0x94, 0x6f, 0x87, 0xe7, 0xbe, 0x73, 0xd1, 0x0e, 0x4d, 0x65, 0xf0, + 0xab, 0xec, 0xcf, 0x03, 0x7d, 0xe0, 0xdd, 0x01, 0xa9, 0x56, 0x37, 0xe4, 0x8c, 0x9a, 0xbe, 0xaa, + 0x51, 0xa5, 0x99, 0x84, 0x4f, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xcc, 0xfb, 0x23, 0xd3, + 0x00, 0x00, 0x00, } diff --git a/protos/peer/configuration.proto b/protos/peer/configuration.proto index 82bd15bfc50..8d43f00b1d0 100644 --- a/protos/peer/configuration.proto +++ b/protos/peer/configuration.proto @@ -35,7 +35,4 @@ message AnchorPeer { // The port number int32 port = 2; - // SSL certificate to be used to maintain mutual TLS - // connection with anchor peer - bytes cert = 3; }