Add getCerts.sh
parent
3e0351384f
commit
47d931c742
|
@ -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
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue