Skip to content

Commit

Permalink
Merge "[FAB-8496] allow modification of affiliations"
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersingh24 authored and Gerrit Code Review committed Mar 7, 2018
2 parents 823fb6b + 7b7fc09 commit 5d7ac01
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fabric-ca/makeDocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function writeRootCA {
- FABRIC_CA_SERVER_DEBUG=true
- BOOTSTRAP_USER_PASS=$ROOT_CA_ADMIN_USER_PASS
- TARGET_CERTFILE=$ROOT_CA_CERTFILE
- FABRIC_ORGS="$ORGS"
volumes:
- ./scripts:/scripts
- ./$DATA:/$DATA
Expand All @@ -157,6 +158,7 @@ function writeIntermediateCA {
- PARENT_URL=https://$ROOT_CA_ADMIN_USER_PASS@$ROOT_CA_HOST:7054
- TARGET_CHAINFILE=$INT_CA_CHAINFILE
- ORG=$ORG
- FABRIC_ORGS="$ORGS"
volumes:
- ./scripts:/scripts
- ./$DATA:/$DATA
Expand Down
8 changes: 8 additions & 0 deletions fabric-ca/scripts/start-intermediate-ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@ fabric-ca-server init -b $BOOTSTRAP_USER_PASS -u $PARENT_URL
# Copy the intermediate CA's certificate chain to the data directory to be used by others
cp $FABRIC_CA_SERVER_HOME/ca-chain.pem $TARGET_CHAINFILE

# Add the custom orgs
for o in $FABRIC_ORGS; do
aff=$aff"\n $o: []"
done
aff="${aff#\\n }"
sed -i "/affiliations:/a \\ $aff" \
$FABRIC_CA_SERVER_HOME/fabric-ca-server-config.yaml

# Start the intermediate CA
fabric-ca-server start
8 changes: 8 additions & 0 deletions fabric-ca/scripts/start-root-ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@ fabric-ca-server init -b $BOOTSTRAP_USER_PASS
# Copy the root CA's signing certificate to the data directory to be used by others
cp $FABRIC_CA_SERVER_HOME/ca-cert.pem $TARGET_CERTFILE

# Add the custom orgs
for o in $FABRIC_ORGS; do
aff=$aff"\n $o: []"
done
aff="${aff#\\n }"
sed -i "/affiliations:/a \\ $aff" \
$FABRIC_CA_SERVER_HOME/fabric-ca-server-config.yaml

# Start the root CA
fabric-ca-server start

0 comments on commit 5d7ac01

Please sign in to comment.