This article explains how different keys and certs under crypto-config are related, even more so why these files are generated in first place.
NOTE: ALl the key pair under crypto-config are ECDSA and certificates are x509 with pem encoding.
Below I have refered the cert(number) by (ref-number)
βββ ordererOrganizations
β βββ example.com # Orderer's domain
β βββ ca (1) # It contains ca.example.com self-signed certificate and corresponding private key
β βββ msp # contains the cert for ca, tlsca and admins
β β βββ admincerts # Contains (3)
β β βββ cacerts # Contains (1)
β β βββ tlscacerts # Contains (2)
β βββ orderers
β β βββ orderer.example.com
β β β βββ msp
β β β β βββ admincerts # Contains (3)
β β β β βββ cacerts # Contains (1)
β β β β βββ keystore # Contains private key for orderer.example.com (4) signed by (1)
β β β β βββ signcerts (4) # Contains certificate for orderer.example.com signed by (1). It is used for Digital Signature
β β β β βββ tlscacerts # Contains (2)
β β β βββ tls # Contains (2) as ca.crt, private key as server.key and crt for orderer.example.com signed by (2) as server.crt
β βββ tlsca (2) # It contains tlsca.example.com self-signed certificate and corresponding private key. This cert is used for signing tls cert of all users and sub-domains orderer of example.com
β βββ users
β βββ [email protected]
β βββ msp
β β βββ admincerts # Contains (3)
β β βββ cacerts # Contains (1)
β β βββ keystore # Contains private key for [email protected] (3) signed by (1)
β β βββ signcerts (3) # Contains certificate for [email protected] signed by (1). It is used for Digital Signature
β β βββ tlscacerts # Contains (2)
β βββ tls # Contains (2) as ca.crt, private key as client.key and crt for [email protected] signed by (2) as client.crt
The structure is similar to OrdererOrganisation structure. Below I have refered the cert(number) by (ref-number)
βββ peerOrganizations
β βββ org1.example.com # Peer's domain
β βββ ca (1) # It contains ca.org1.example.com self-signed certificate and corresponding private key
β βββ msp # contains the cert for ca, tlsca and admins
β β βββ admincerts # Contains (3)
β β βββ cacerts # Contains (1)
β β βββ tlscacerts # Contains (2)
β βββ peers
β β βββ peer0.org1.example.com
β β β βββ msp
β β β β βββ admincerts # Contains (3)
β β β β βββ cacerts # Contains (1)
β β β β βββ keystore # Contains private key for peer0.org1.example.com (4) signed by (1)
β β β β βββ signcerts (4) # Contains certificate for peer0.org1.example.com signed by (1). It is used for Digital Signature
β β β β βββ tlscacerts # Contains (2)
β β β βββ tls # Contains (2) as ca.crt, private key as server.key and crt for peer0.org1.example.com signed by (2) as server.crt
β βββ tlsca (2) # It contains tlsca.example.com self-signed certificate and corresponding private key. This cert is used for signing tls cert of all users and peers of org1.example.com
β βββ users
β βββ [email protected]
β βββ msp
β β βββ admincerts # Contains (3)
β β βββ cacerts # Contains (1)
β β βββ keystore # Contains private key for [email protected] (3) signed by (1)
β β βββ signcerts (3) # Contains certificate for [email protected] signed by (1). It is used for Digital Signature
β β βββ tlscacerts # Contains (2)
β βββ tls # Contains (2) as ca.crt, private key as client.key and crt for [email protected] signed by (2) as client.crt
Probably best tool to investigate crypto-config is openssl
openssl x509 -in <certificate-path> -text -noout