File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
fabric-chaincode-shim/src/test
java/org/hyperledger/fabric/shim Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,12 @@ void startAndStopTlsPassword() {
288288 try {
289289 final ChaincodeBase chaincodeBase = new EmptyChaincode ();
290290 chaincodeBase .processEnvironmentOptions ();
291- ChaincodeServer chaincodeServer = new NettyChaincodeServer (chaincodeBase , new ChaincodeServerProperties ());
291+ final ChaincodeServerProperties chaincodeServerProperties = new ChaincodeServerProperties ();
292+ chaincodeServerProperties .setTlsEnabled (true );
293+ chaincodeServerProperties .setKeyFile ("src/test/resources/client.key.password-protected" );
294+ chaincodeServerProperties .setKeyCertChainFile ("src/test/resources/client.crt" );
295+ chaincodeServerProperties .setKeyPassword ("test" );
296+ ChaincodeServer chaincodeServer = new NettyChaincodeServer (chaincodeBase , chaincodeServerProperties );
292297 new Thread (() -> {
293298 try {
294299 chaincodeServer .start ();
@@ -315,6 +320,9 @@ void startAndStopTlsWithoutPassword() {
315320 final ChaincodeBase chaincodeBase = new EmptyChaincode ();
316321 chaincodeBase .processEnvironmentOptions ();
317322 final ChaincodeServerProperties chaincodeServerProperties = new ChaincodeServerProperties ();
323+ chaincodeServerProperties .setTlsEnabled (true );
324+ chaincodeServerProperties .setKeyFile ("src/test/resources/client.key" );
325+ chaincodeServerProperties .setKeyCertChainFile ("src/test/resources/client.crt" );
318326 ChaincodeServer chaincodeServer = new NettyChaincodeServer (chaincodeBase , chaincodeServerProperties );
319327 new Thread (() -> {
320328 try {
Original file line number Diff line number Diff line change 1+ -----BEGIN ENCRYPTED PRIVATE KEY-----
2+ MIGxMBwGCiqGSIb3DQEMAQMwDgQIfzm0IqTm+rACAggABIGQDY1vpaSD+KDuVRyT
3+ Gi35536iOYUuVoz01ktV3YCDv03Pm5+8xZ1JXXW8lDM3JP/TcKbocRRk63y/R7O2
4+ dB9kcyV7/gYtYH0B3TMk1/x1WtfHL8JnYRFHQ/OuhYjJ6O04B4aY2waeYByzsIsI
5+ YhNVZq5fZ7/bjsy8b54o57WD4DDHH3uRysbv8I5TaDVyJMJq
6+ -----END ENCRYPTED PRIVATE KEY-----
You can’t perform that action at this time.
0 commit comments