Hyperledger Fabric教程(2)-- byfn.sh分析-生成身份证书

证书存放位置

shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peerOrganizations
drwxr-xr-x 3 shijianfeng shijianfeng 4096 Jan  6 05:59 ordererOrganizations
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/
total 8
drwxr-xr-x 7 shijianfeng shijianfeng 4096 Jan  6 05:59 org1.example.com
drwxr-xr-x 7 shijianfeng shijianfeng 4096 Jan  6 05:59 org2.example.com
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/
total 20
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 ca
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 users
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 tlsca
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peers
drwxr-xr-x 5 shijianfeng shijianfeng 4096 Jan  6 05:59 msp
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/peers/
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer1.org1.example.com
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer0.org1.example.com
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/
total 8
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 tls
drwxr-xr-x 7 shijianfeng shijianfeng 4096 Jan  6 05:59 msp
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/ca/
total 8
-rw-rw-r-- 1 shijianfeng shijianfeng 847 Jan  6 05:59 ca.org1.example.com-cert.pem
-rwx------ 1 shijianfeng shijianfeng 241 Jan  6 05:59 1f9c603a2afcdfc65e12d5f65e4245e09131d31e810ebc6f86f3cff0220b3fef_sk
shijianfeng@k8s-master:~/fabric-samples/first-network$ 

 

 

 

cryptogen generate --config=./crypto-config.yaml

  • --ca:存放组织的根证书和对应的私钥文件,组织内的实体将基于该根证书作为证书 根。
  • --cacerts:组织的根证书,同ca目录下文件。
  • --admincerts:组织管理员的身份验证证书。Peer将基于这些证书来认证交易签署者是 否为 管理员身份。
  • --cacerts:存放组织的根证书。
  • --keystore:本节点的身份私钥,用来签名。
  • --signcerts:验证本节点签名的证书,被组织根证书签名。
  • --tlscacerts:TLS连接用的身份证书,即组织TLS证书。

 

Hyperledger Fabric教程(2)-- byfn.sh分析-生成身份证书

 

vim crypto-config.yaml

Hyperledger Fabric教程(2)-- byfn.sh分析-生成身份证书

 

shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peerOrganizations
drwxr-xr-x 3 shijianfeng shijianfeng 4096 Jan  6 05:59 ordererOrganizations
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/ordererOrganizations/example.com/
total 20
drwxr-xr-x 3 shijianfeng shijianfeng 4096 Jan  6 05:59 users
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 tlsca
drwxr-xr-x 3 shijianfeng shijianfeng 4096 Jan  6 05:59 orderers
drwxr-xr-x 5 shijianfeng shijianfeng 4096 Jan  6 05:59 msp
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 ca
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/ordererOrganizations/example.com/orderers/
total 4
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 orderer.example.com

shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org
org1.example.com/ org2.example.com/ 
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/peers
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer1.org1.example.com
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer0.org1.example.com
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/users/
Admin@org1.example.com/ User1@org1.example.com/ 
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/
total 20
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 ca
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 users
drwxr-xr-x 2 shijianfeng shijianfeng 4096 Jan  6 05:59 tlsca
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peers
drwxr-xr-x 5 shijianfeng shijianfeng 4096 Jan  6 05:59 msp
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/peers/
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer1.org1.example.com
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 peer0.org1.example.com
shijianfeng@k8s-master:~/fabric-samples/first-network$ ls -lrt crypto-config/peerOrganizations/org1.example.com/users/
total 8
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 User1@org1.example.com
drwxr-xr-x 4 shijianfeng shijianfeng 4096 Jan  6 05:59 Admin@org1.example.com
shijianfeng@k8s-master:~/fabric-samples/first-network$ 

 

上一篇:union all / union


下一篇:一次linux服务器报警有大量僵尸进程的问题处理