问题
I am executing
../bin/cryptogen generate --config=./crypto-config.yaml
command following build your First Network in Hyperledger Fabric tutorial.
I see that the Admin and User .pem certificates are created in "signcerts" directory (in msp dir) but they are not copied in "admincerts" directory.
What is the configuration to solve this?
回答1:
For a workaround you can downgrade your cryptogen version to 1.4.2 as you must be having 1.4.3 version of cryptogen binary.
As of 1.4.3, there is also an OU for admins so you no longer have to explicitly place certs in the admincerts folder of the MSP directory.
When using cryptogen, you can enable this feature by setting EnableNodeOUs to true in your crypto-config.yaml file and running cryptogen generate --config crypto-config.yaml. For example, this will enabled NodeOUs for a peer org:
PeerOrgs:
- Name: org1
Domain: org1.example.com
EnableNodeOUs: true
Template:
Count: 2
SANS:
- "localhost"
- "127.0.0.1"
- "{{.Hostname}}-{{.Domain}}"
Users:
Count: 1
You can also check this answer(by Gari Singh) for better explanation of the new functionality of Organizational identifiers in the latest version of fabric binaries:
Hyperledger fabric cryptgen tool not creating the admincerts
来源:https://stackoverflow.com/questions/58292383/hyperledger-cryptogen-utility-missing-admin-and-user-pem-cert-in-admincerts-bu