Skip to content

Commit

Permalink
fixes #2032, issue of importing external CAs
Browse files Browse the repository at this point in the history
Signed-off-by: Jack (T.) Jia <jack-tiefeng.jia@ibm.com>
  • Loading branch information
jackjia-ibm committed Mar 25, 2021
1 parent d41a391 commit 255844f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/apiml_cm.sh
Expand Up @@ -216,10 +216,10 @@ function import_local_ca_certificate {
}

function import_external_ca_certificates {
if ls "${EXTERNAL_CA_FILENAME}.*.cer" 1> /dev/null 2>&1; then
if ls "${EXTERNAL_CA_FILENAME}".*.cer 1> /dev/null 2>&1; then
echo "Import the external Certificate Authorities to the truststore:"
I=1
for FILENAME in "${EXTERNAL_CA_FILENAME}.*.cer"; do
for FILENAME in "${EXTERNAL_CA_FILENAME}".*.cer; do
[ -e "$FILENAME" ] || continue
pkeytool -importcert $V -trustcacerts -noprompt -file "${FILENAME}" -alias "extca${I}" -keystore "${SERVICE_TRUSTSTORE}.p12" -storepass "${SERVICE_PASSWORD}" -storetype PKCS12
I=$((I+1))
Expand All @@ -243,9 +243,9 @@ function import_signed_certificate {

function import_external_certificate {
echo "Import the external Certificate Authorities to the keystore:"
if ls "${EXTERNAL_CA_FILENAME}.*.cer" 1> /dev/null 2>&1; then
if ls "${EXTERNAL_CA_FILENAME}".*.cer 1> /dev/null 2>&1; then
I=1
for FILENAME in "${EXTERNAL_CA_FILENAME}.*.cer"; do
for FILENAME in "${EXTERNAL_CA_FILENAME}".*.cer; do
[ -e "$FILENAME" ] || continue
pkeytool -importcert $V -trustcacerts -noprompt -file "${FILENAME}" -alias "extca${I}" -keystore "${SERVICE_KEYSTORE}.p12" -storepass "${SERVICE_PASSWORD}" -storetype PKCS12
I=$((I+1))
Expand Down

0 comments on commit 255844f

Please sign in to comment.