From 5fdf986cde7dd660651e6dae00d684c11a99bd19 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 8 Jun 2024 16:39:44 +0200 Subject: [PATCH] cd_write_ca_certificates --- cd.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/cd.sh b/cd.sh index b12c1e7..fe65ea1 100644 --- a/cd.sh +++ b/cd.sh @@ -480,20 +480,22 @@ cd_install_ca_certificates () { } cd_write_ca_certificates () { -local index -local path -local text cd_step "Write CA certificates" cd_mkdir "${CD_CA_ROOT}" - index=1 - eval "text=\"\${CD_CA_${index}}\"" - while [ "${text}" ] ; do - path="${CD_CA_ROOT}/${index}.crt" + cd_write_ca_certificates__index=1 + eval "cd_write_ca_certificates__text=\ +\"\${CD_CA_${cd_write_ca_certificates__index}}\"" + while [ "${cd_write_ca_certificates__text}" ] ; do + cd_write_ca_certificates__path="\ +${CD_CA_ROOT}/${cd_write_ca_certificates__index}.crt" cd_split - cd_write "${path}" "${text}" - cd_openssl "${path}" - index=$((index+1)) - eval "text=\"\${CD_CA_${index}}\"" + cd_write \ + "${cd_write_ca_certificates__path}" \ + "${cd_write_ca_certificates__text}" + cd_openssl "${cd_write_ca_certificates__path}" + cd_write_ca_certificates__index=$((cd_write_ca_certificates__index+1)) + eval "cd_write_ca_certificates__text=\ +\"\${CD_CA_${cd_write_ca_certificates__index}}\"" done }