diff --git a/hyperledger_fabric/test/auto.sh b/hyperledger_fabric/test/auto.sh new file mode 100644 index 00000000..559a4d4e --- /dev/null +++ b/hyperledger_fabric/test/auto.sh @@ -0,0 +1,2 @@ +bash fetch-config-block.sh dhanNodeOUf1 testchainid dhannodeouf1-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20003 +bash fetch-config-block.sh dhanNodeOUf1 nodeouchannel01 dhannodeouf1-bcsnativetest-iad.blockchain.test.ocp.oc-test.com:20003 diff --git a/hyperledger_fabric/test/getCerts.sh b/hyperledger_fabric/test/getCerts.sh new file mode 100644 index 00000000..912a53d0 --- /dev/null +++ b/hyperledger_fabric/test/getCerts.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Generate certs from org json file +# It will overwrite any local cert files + +# Usage: ./script jsonFile + +if [ $# -lt 1 ]; then + echo "Please use the json file as the argument" && exit 1 +fi + +file=$1 + +echo "Output admin cert" +jq -r ".certs.admincert" $file > admin.cert + +echo "Output ca cert" +jq -r ".certs.cacert" $file > ca.cert + +echo "Output intermediate certs" +jq -r ".certs.intermediatecerts" $file > intermediate.cert + +echo "Output adminou cert" +jq -r ".certs.nodeouidentifiercert.adminouidentifiercert" $file > adminou.cert + +echo "Output clientou cert" +jq -r ".certs.nodeouidentifiercert.clientouidentifiercert" $file > clientou.cert + +echo "Output peerou cert" +jq -r ".certs.nodeouidentifiercert.peerouidentifiercert" $file > peerou.cert + +echo "Output ordererou cert" +jq -r ".certs.nodeouidentifiercert.ordererouidentifiercert" $file > ordererou.cert +