-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow client TLS certificate and key to be specified in connection pr…
…ofile (#261) Signed-off-by: Sheng Guo <[email protected]> (cherry picked from commit 678746b)
- Loading branch information
1 parent
51ddbbf
commit 7fac5e4
Showing
9 changed files
with
289 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
src/test/fixture/sdkintegration/network_configs/network-config-client-tls.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"name": "global-trade-network", | ||
"x-type": "hlfv1", | ||
"description": "The network to be in if you want to stay in the global trade business", | ||
"version": "1.0.0", | ||
"client": { | ||
"organization": "Org1", | ||
"credentialStore": { | ||
"path": "/tmp/hfc-kvs", | ||
"cryptoStore": { | ||
"path": "/tmp/hfc-cvs" | ||
}, | ||
"wallet": "wallet-name" | ||
} | ||
}, | ||
"channels": { | ||
"mychannel": { | ||
"orderers": [ | ||
"orderer.example.com" | ||
], | ||
"peers": { | ||
"peer0.org1.example.com": { | ||
"endorsingPeer": true, | ||
"chaincodeQuery": true, | ||
"ledgerQuery": true, | ||
"eventSource": true | ||
|
||
}, | ||
"peer1.org1.example.com": { | ||
"endorsingPeer": true, | ||
"chaincodeQuery": true, | ||
"ledgerQuery": true, | ||
"eventSource": true | ||
} | ||
}, | ||
"chaincodes": [ | ||
"example02:v1", | ||
"marbles:1.0" | ||
] | ||
} | ||
}, | ||
"organizations": { | ||
"Org1": { | ||
"mspid": "Org1MSP", | ||
"peers": [ | ||
"peer0.org1.example.com", | ||
"peer1.org1.example.com" | ||
], | ||
"certificateAuthorities": [ | ||
"ca-org1" | ||
], | ||
"adminPrivateKey": { | ||
"pem": "-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQghnA7rdgbZi/wndusiXjyf0KgE6OKZjQ+5INjwelRAC6hRANCAASb3u+hY+U/FZvhYDN6d08HJ1v56UJUyz/n2NHyJgTg6kC05AaJMeGIinEF0JeJtRDNVQGzoQJQYjnzUTS9FvGh\n-----END PRIVATE KEY-----" | ||
}, | ||
"signedCert": { | ||
"path": "src/test/fixture/sdkintegration/e2e-2Orgs/v1.3/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]" | ||
} | ||
} | ||
}, | ||
"orderers": { | ||
"orderer.example.com": { | ||
"url": "grpcs://localhost:7050", | ||
"grpcOptions": { | ||
"ssl-target-name-override": "orderer.example.com", | ||
"grpc-max-send-message-length": 15 | ||
}, | ||
"tlsCACerts": { | ||
"pem": "-----BEGIN CERTIFICATE----- <etc>" | ||
} | ||
} | ||
}, | ||
"peers": { | ||
"peer0.org1.example.com": { | ||
"url": "grpcs://localhost:7051", | ||
"grpcOptions": { | ||
"ssl-target-name-override": "peer0.org1.example.com", | ||
"grpc.http2.keepalive_time": 15 | ||
}, | ||
"tlsCACerts": { | ||
"path": "src/test/fixture/sdkintegration/e2e-2Orgs/v1.3/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt", | ||
"client": { | ||
"certfile": "./tls/sign.pem", | ||
"keyfile": "./tls/key.pem" | ||
} | ||
} | ||
}, | ||
"peer1.org1.example.com": { | ||
"url": "grpcs://localhost:7051", | ||
"grpcOptions": { | ||
"ssl-target-name-override": "peer1.org1.example.com", | ||
"grpc.http2.keepalive_time": 15 | ||
}, | ||
"tlsCACerts": { | ||
"path": "src/test/fixture/sdkintegration/e2e-2Orgs/v1.3/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt", | ||
"client": { | ||
"certPem": "-----BEGIN CERTIFICATE----- <etc>", | ||
"keyPem": "-----BEGIN PRIVATE KEY----- <etc>" | ||
} | ||
} | ||
} | ||
},"certificateAuthorities": { | ||
"ca-org1": { | ||
"url": "https://localhost:7054", | ||
"httpOptions": { | ||
"verify": true | ||
}, | ||
"tlsCACerts": { | ||
"path": "peerOrganizations/org1.example.com/ca/org1.example.com-cert.pem", | ||
"pem": "-----BEGIN CERTIFICATE----- <etc>" | ||
}, | ||
"registrar": [ | ||
{ | ||
"enrollId": "admin", | ||
"enrollSecret": "adminpw" | ||
} | ||
], | ||
"caName": "caNameHere" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEILaiKBtmV7pPCel9NBp74A6jJWHc/Vobug5AyMkncB3ToAoGCCqGSM49 | ||
AwEHoUQDQgAEJT+fZ/nl8t38QY6VmddSvjB9HMITio6JUFZhDJ3qoAqCVAfKi6EI | ||
sH+zLZuZA/324j3iHRYkNFUqkNA9wU91qw== | ||
-----END EC PRIVATE KEY----- |
Oops, something went wrong.