From afd10e2516f3d8628177983e8ac7d327a499a893 Mon Sep 17 00:00:00 2001 From: Joerg Heinemann Date: Tue, 3 Feb 2026 17:18:46 +0100 Subject: [PATCH] Refactor password file creation and cleanup --- install/step-ca-install.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install/step-ca-install.sh b/install/step-ca-install.sh index 2277410f4..d0cd08237 100644 --- a/install/step-ca-install.sh +++ b/install/step-ca-install.sh @@ -61,8 +61,7 @@ EncryptionPwdDir="$(step path)/encryption" PwdFile="$EncryptionPwdDir/ca.pwd" ProvisionerPwdFile="$EncryptionPwdDir/provisioner.pwd" -$STD mkdir -p "$EncryptionPwdDir" - +mkdir -p "$EncryptionPwdDir" $STD gpg --gen-random --armor 2 32 >"$PwdFile" $STD gpg --gen-random --armor 2 32 >"$ProvisionerPwdFile" @@ -77,16 +76,9 @@ $STD step ca init \ --password-file="$PwdFile" \ --provisioner-password-file="$ProvisionerPwdFile" -echo -echo "Make a note of the root fingerprint!" -echo "You'll need it in future steps to establish trust with your CA from other environments or hosts." -echo - -$STD ln -s "$PwdFile" "$(step path)/password.txt" - +ln -s "$PwdFile" "$(step path)/password.txt" chown -R step:step $(step path) chmod -R 700 $(step path) - msg_ok "Initialized step-ca" msg_info "Add ACME provisioner"