X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fauthz.git;a=blobdiff_plain;f=conf%2FCA%2Fbootstrap.sh;fp=conf%2FCA%2Fbootstrap.sh;h=831b0ee6b9a841bb4ccd230135bd7d2ba6952840;hp=c6064fbed9166bf97306f4c2c42f9c9ffa863b68;hb=2b46f76d9a688acf326424659ec9672a2614fdcf;hpb=bf3d3075cac610b901c951ae135fcdbcc6ffecb8 diff --git a/conf/CA/bootstrap.sh b/conf/CA/bootstrap.sh index c6064fbe..831b0ee6 100644 --- a/conf/CA/bootstrap.sh +++ b/conf/CA/bootstrap.sh @@ -142,14 +142,15 @@ $PASSPHRASE EOF # Make Issuer name -ISSUER=$(openssl x509 -subject -noout -in $SIGNER_CRT | cut -c 10-) -for I in ${ISSUER//\// }; do - if [ -n "$CADI_X509_ISSUER" ]; then - CADI_X509_ISSUER=", $CADI_X509_ISSUER" +ISSUER=$(openssl x509 -subject -noout -in $SIGNER_CRT | cut -c 9- | sed -e 's/ = /=/g') +for I in $ISSUER; do + if [ -z "$REVERSE" ]; then + REVERSE="${I%,}" + else + REVERSE="${I%,}, ${REVERSE}" fi - CADI_X509_ISSUER="$I$CADI_X509_ISSUER" done -echo $CADI_X509_ISSUER > $BOOTSTRAP_ISSUER +echo "$REVERSE" > $BOOTSTRAP_ISSUER # Cleanup rm -f $BOOTSTRAP_SAN $BOOTSTRAP_KEY $BOOTSTRAP_CSR $BOOTSTRAP_CRT $SIGNER_KEY $SIGNER_CRT $BOOTSTRAP_CHAIN