aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-09-09 12:54:16 +0000
committerGerrit Code Review <gerrit@onap.org>2021-09-09 12:54:16 +0000
commitc52cc3078f5efacc06a240c07cd7caf55da1afd1 (patch)
tree8076fa7ace8f43c05b7dc1bb84255dc937220a82 /kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
parentb5a0709b96eec2ef0d7b6a6cfe799d31cfad0d1b (diff)
parent3dc8cc2b34ad03b027a07c65e2ed39b3162f9a1f (diff)
Merge "[OOM] Update Linux SSL Truststore /etc/ssl"
Diffstat (limited to 'kubernetes/common/cert-wrapper/resources/import-custom-certs.sh')
-rwxr-xr-xkubernetes/common/cert-wrapper/resources/import-custom-certs.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
index eb07a74cd4..fa3de03ece 100755
--- a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
+++ b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
@@ -22,6 +22,7 @@ WORK_DIR=${WORK_DIR:-/updatedTruststore}
ONAP_TRUSTSTORE=${ONAP_TRUSTSTORE:-truststoreONAPall.jks}
JRE_TRUSTSTORE=${JRE_TRUSTSTORE:-$JAVA_HOME/lib/security/cacerts}
TRUSTSTORE_OUTPUT_FILENAME=${TRUSTSTORE_OUTPUT_FILENAME:-truststore.jks}
+SSL_WORKDIR=${SSL_WORKDIR:-/usr/local/share/ca-certificates}
mkdir -p $WORK_DIR
@@ -75,3 +76,15 @@ for f in $WORK_DIR/*; do
fi
fi
done
+
+# Import certificates to Linux SSL Truststore
+cp $CERTS_DIR/*.crt $SSL_WORKDIR/.
+cp $MORE_CERTS_DIR/*.crt $SSL_WORKDIR/.
+update-ca-certificates
+if [ $? != 0 ]
+ then
+ echo "failed importing certificates"
+ exit 1
+ else
+ cp /etc/ssl/certs/ca-certificates.crt $WORK_DIR/.
+fi \ No newline at end of file