@@ -179,8 +179,9 @@ echo ""
179179
180180KOPIA=(" kopia" " --config-file=${KOPIA_CACHE_DIR} /kopia.config" " --log-dir=${KOPIA_CACHE_DIR} /logs" " --file-log-level=${KOPIA_FILE_LOG_LEVEL} " " --log-dir-max-files=${KOPIA_LOG_DIR_MAX_FILES} " " --log-dir-max-age=${KOPIA_LOG_DIR_MAX_AGE} " )
181181if [[ -n " ${CUSTOM_CA} " ]]; then
182- echo " Using custom CA."
183- export KOPIA_CA_CERT=" ${CUSTOM_CA} "
182+ echo " Using custom CA certificate at: ${CUSTOM_CA} "
183+ # Note: Custom CA is now handled via --root-ca-pem-path flag in S3 connect/create commands
184+ # The KOPIA_CA_CERT environment variable is not used by Kopia for S3 connections
184185fi
185186
186187echo " === Kopia Version ==="
@@ -872,6 +873,12 @@ function connect_repository {
872873 S3_CONNECT_CMD+=(--disable-tls)
873874 fi
874875
876+ # Add custom CA certificate if specified
877+ if [[ -n " ${CUSTOM_CA} " ]] && [[ -f " ${CUSTOM_CA} " ]]; then
878+ echo " Adding custom CA certificate for S3 connection: ${CUSTOM_CA} "
879+ S3_CONNECT_CMD+=(--root-ca-pem-path=" ${CUSTOM_CA} " )
880+ fi
881+
875882 # Add username/hostname overrides if specified
876883 add_user_overrides S3_CONNECT_CMD
877884
@@ -1085,6 +1092,12 @@ function create_repository {
10851092 S3_CREATE_CMD+=(--disable-tls)
10861093 fi
10871094
1095+ # Add custom CA certificate if specified
1096+ if [[ -n " ${CUSTOM_CA} " ]] && [[ -f " ${CUSTOM_CA} " ]]; then
1097+ echo " Adding custom CA certificate for S3 repository creation: ${CUSTOM_CA} "
1098+ S3_CREATE_CMD+=(--root-ca-pem-path=" ${CUSTOM_CA} " )
1099+ fi
1100+
10881101 # Add username/hostname overrides if specified
10891102 add_user_overrides S3_CREATE_CMD
10901103
0 commit comments