From afc30b3bcbdac133411854b3dec363dce71df962 Mon Sep 17 00:00:00 2001 From: Mykola Morhun Date: Fri, 11 Dec 2020 15:46:25 +0200 Subject: [PATCH] Fix Che server entrypoint script for case of commonly trusted certificate Signed-off-by: Mykola Morhun --- dockerfiles/che/entrypoint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dockerfiles/che/entrypoint.sh b/dockerfiles/che/entrypoint.sh index 0416d24851f..686c19480dc 100755 --- a/dockerfiles/che/entrypoint.sh +++ b/dockerfiles/che/entrypoint.sh @@ -322,10 +322,15 @@ add_che_cert_to_truststore() { fi } -add_public_cert_to_truststore() { +add_public_certs_to_truststore() { JAVA_TRUST_STORE=/home/user/cacerts + DEFAULT_JAVA_TRUST_STORE=${JAVA_HOME}/lib/security/cacerts DEFAULT_JAVA_TRUST_STOREPASS="changeit" + if [ ! -f "$JAVA_TRUST_STORE" ]; then + cp "$DEFAULT_JAVA_TRUST_STORE" "$JAVA_TRUST_STORE" + fi + chmod 644 "$JAVA_TRUST_STORE" CUSTOM_PUBLIC_CERTIFICATES="/public-certs" @@ -439,7 +444,7 @@ init init_global_variables set_environment_variables add_che_cert_to_truststore -add_public_cert_to_truststore +add_public_certs_to_truststore # run che start_che_server &