summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cert-wrapper/resources
diff options
context:
space:
mode:
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2021-09-05 16:32:22 +0200
committerAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2021-09-05 22:56:51 +0200
commit3dc8cc2b34ad03b027a07c65e2ed39b3162f9a1f (patch)
tree8f0d115121dcbfd3ea2ea1c6716b3ea9990da3a4 /kubernetes/common/cert-wrapper/resources
parent3980a8cbeb63c885b123ac50033e32ed996bb39a (diff)
[OOM] Update Linux SSL Truststore /etc/ssl
Add update for /etc/ssl/cacerts/ca-certificates.crt Issue-ID: CCSDK-3356 Change-Id: I797aea054bb80db805f4791a288e89b102e1d662 Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Diffstat (limited to 'kubernetes/common/cert-wrapper/resources')
-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 6df7505e7b..0667ae214e 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
@@ -76,3 +77,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