-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change property names from tlsClient* to client*; add unit test and f…
…ixture;Refactor clientCert* and clientKey* to constant.
- Loading branch information
Sheng Guo
committed
Feb 8, 2023
1 parent
4d3cfc5
commit 7a23bf3
Showing
9 changed files
with
325 additions
and
50 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/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" | ||
} | ||
} | ||
}, | ||
"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----- |
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,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIB9DCCAZkCCQCmIOuczbyLyDAKBggqhkjOPQQDAjBzMQswCQYDVQQGEwJVUzET | ||
MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcG | ||
A1UECgwQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAwwTY2Eub3JnMS5leGFtcGxl | ||
LmNvbTAgFw0yMzAyMDYxMDQyNTVaGA8yMDUwMDYyNDEwNDI1NVowgY0xCzAJBgNV | ||
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNp | ||
c2NvMRkwFwYDVQQKDBBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQLDBNjYS5vcmcx | ||
LmV4YW1wbGUuY29tMRgwFgYDVQQDDA90ZXN0LWNsaWVudC10bHMwWTATBgcqhkjO | ||
PQIBBggqhkjOPQMBBwNCAAQlP59n+eXy3fxBjpWZ11K+MH0cwhOKjolQVmEMneqg | ||
CoJUB8qLoQiwf7Mtm5kD/fbiPeIdFiQ0VSqQ0D3BT3WrMAoGCCqGSM49BAMCA0kA | ||
MEYCIQCZUkbolLixLdXyFu5KJiwnC5leT7XBHiNbnFoG1VZTqAIhANyQCvhmfGPz | ||
A/UdQJekD5Ukib+sRJln9nzody03dby2 | ||
-----END CERTIFICATE----- |
Oops, something went wrong.