Start by saying the certificate is there when the environment carries it

The boot check looked only at the file path, so a pod given the
certificate's contents said signing would be unavailable while it was
not.
This commit is contained in:
2026-10-20 12:54:27 -07:00
parent 80960112ca
commit 2f8d94e2fa
+4 -1
View File
@@ -8,7 +8,10 @@ printf "🔐 Checking certificate configuration...\n"
CERT_PATH="${NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH:-/opt/hanzo-sign/cert.p12}"
if [ -f "$CERT_PATH" ] && [ -r "$CERT_PATH" ]; then
# The signer takes the certificate's contents before its path, so the check does too.
if [ -n "$NEXT_PRIVATE_SIGNING_LOCAL_FILE_CONTENTS" ]; then
printf "✅ Certificate provided in the environment - document signing is ready!\n"
elif [ -f "$CERT_PATH" ] && [ -r "$CERT_PATH" ]; then
printf "✅ Certificate file found and readable - document signing is ready!\n"
else
printf "⚠️ Certificate not found or not readable\n"