From eeb44bd6a50bbb6638061830b63d1006e2be5d17 Mon Sep 17 00:00:00 2001 From: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> Date: Tue, 3 Nov 2026 07:16:44 +0000 Subject: [PATCH] fix: count only successfully imported JDK certificates jdk_import_ca_bundle incremented certs_imported a second time after every keytool call, so the "[jdk] Imported N certificates" message reported twice the number of successful imports plus every failed one. Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> --- base/ubi10/entrypoint.sh | 1 - base/ubi9/entrypoint.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/base/ubi10/entrypoint.sh b/base/ubi10/entrypoint.sh index c58f7226..3e289eac 100644 --- a/base/ubi10/entrypoint.sh +++ b/base/ubi10/entrypoint.sh @@ -36,7 +36,6 @@ jdk_import_ca_bundle() { if keytool -import -trustcacerts -cacerts -storepass "$KEYSTORE_PASSWORD" -noprompt -alias "${bundle_name}_${cert_index}" -file $tmp_file; then certs_imported=$((certs_imported+1)) fi - certs_imported=$((certs_imported+1)) elif [ "$is_cert" = true ]; then echo "$line" >> ${tmp_file} fi diff --git a/base/ubi9/entrypoint.sh b/base/ubi9/entrypoint.sh index 8dc55500..882ba2f5 100644 --- a/base/ubi9/entrypoint.sh +++ b/base/ubi9/entrypoint.sh @@ -35,7 +35,6 @@ jdk_import_ca_bundle() { if keytool -import -trustcacerts -cacerts -storepass "$KEYSTORE_PASSWORD" -noprompt -alias "${bundle_name}_${cert_index}" -file $tmp_file; then certs_imported=$((certs_imported+1)) fi - certs_imported=$((certs_imported+1)) elif [ "$is_cert" = true ]; then echo "$line" >> ${tmp_file} fi