如何在创建 Fabric 网络时在我的 Fabric 证书中配置 L、ST、C... 属性?

How to configure L, ST, C... propeties in my Fabric certificates when creating the Fabric network?

我在我的对等节点中看到此日志:

2019-12-06 12:47:51.496 UTC [comm.grpc.server] 1 -> INFO 8c9 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.peer_address=10.244.0.1:35758 grpc.peer_subject="CN=blockchain-hapeer1.mydomain.net,L=San Francisco,ST=California,C=US" error=EOF grpc.code=Unknown grpc.call_duration=1.803311ms

我没有在证书创建过程中配置 L、ST 或 C(cryptogen 和 configtxgen 命令)。我应该在哪里配置它,以便生成证书而不是使用这些默认值(旧金山、加利福尼亚等),而是使用适合我的国家和组织的正确值? configtx.yaml...加密-config.yaml ?

它应该进入 crypto-config.yamlhttps://github.com/hyperledger/fabric-sdk-py/blob/master/test/fixtures/e2e_cli/crypto-config.yaml

无论如何,在出现更类似于预生产环境的东西之前,您通常不会太在意它,在那种情况下,您应该使用 CA(通常是 Fabric-CA)而不是 cryptogen。使用 Fabric-CA 时,您必须检查 CA 本身的 fabric-ca-server-config.yaml(在其 FABRIC_CA_SERVER_HOME 中)和其客户端中的 fabric-ca-client-config.yaml(在其 FABRIC_CA_CLIENT_HOME 中)。

您可以向各个组织添加 CA 部分:

PeerOrgs:
  # ---------------------------------------------------------------------------
  # Org1
  # ---------------------------------------------------------------------------
  - Name: Org1
    Domain: org1.example.com

    # ---------------------------------------------------------------------------
    # "CA"
    # ---------------------------------------------------------------------------
    # Uncomment this section to enable the explicit definition of the CA for this
    # organization.  This entry is a Spec.  See "Specs" section below for details.
    # ---------------------------------------------------------------------------
    CA:
    #    Hostname: ca # implicitly ca.org1.example.com
    #    Country: US
    #    Province: California
    #    Locality: San Francisco
    #    OrganizationalUnit: COP
    #    StreetAddress: address for org # default nil
    #    PostalCode: postalCode for org # default nil