-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
External launch metadata uses PEM encoding
The `chaincode.json` generated by the peer for use with external builders and launchers uses strings to hold the PEM encoded certificates and keys provided to the chaincode. This change prevents base64 encoding of the (already) base64 PEM encoded materials. In practical terms, we no longer need to use `base64 --decode` in the run scripts. FAB-17007 # done Change-Id: I3ab3818ec5e82e86a2bb7975720384236163bd63 Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
- Loading branch information
Showing
4 changed files
with
23 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/bash | ||
|
||
OUTPUT_JSON="$(jq -S . $2/chaincode.json)" | ||
OUTPUT_JSON="$(jq -S . "$2/chaincode.json")" | ||
|
||
EXPECTED_JSON="$(echo '{"chaincode_id":"test-ccid","peer_address":"fake-peer-address","client_cert":"ZmFrZS1jbGllbnQtY2VydA==","client_key":"ZmFrZS1jbGllbnQta2V5","root_cert":"ZmFrZS1yb290LWNlcnQ="}' | jq -S .)" | ||
EXPECTED_JSON="$(echo '{"chaincode_id":"test-ccid","peer_address":"fake-peer-address","client_cert":"fake-client-cert","client_key":"fake-client-key","root_cert":"fake-root-cert"}' | jq -S .)" | ||
|
||
if [ "$OUTPUT_JSON" = "$EXPECTED_JSON" ] ; then | ||
exit 0 | ||
fi | ||
|
||
echo "got $OUTPUT_JSON; want $EXPECTED_JSON" | ||
exit 1 |
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