X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=conf%2FCA%2Fbootstrap.sh;h=6ccc6bfa425a68b7009a69c2dda059dd2d30aa35;hb=2b5103e038a7727734097a671d331db9aaab77ba;hp=c6064fbed9166bf97306f4c2c42f9c9ffa863b68;hpb=27afb0201ce717c25d8ffcc50f8b4972fc98f5c5;p=aaf%2Fauthz.git diff --git a/conf/CA/bootstrap.sh b/conf/CA/bootstrap.sh index c6064fbe..6ccc6bfa 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' -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