Update make_pfx function.

This commit is contained in:
2026-03-04 22:08:28 +01:00
parent a6c0878eba
commit 9f71b0e815
2 changed files with 91 additions and 12 deletions

View File

@@ -99,3 +99,16 @@ fi
# List the generated server certificate and key for verification
display_certificate "$CERT_DIR/test_cert.pem"
# Create a PKCS#12 (PFX) file for the server certificate
if ! make_pfx --ca-dir "$CA_DIR" --issuing-ca "issuing_ca" --path "$CERT_DIR/test_cert.pem" --password "s3cr3t"; then
echo "ERROR: Failed to create PKCS#12 (PFX) file." >&2
exit 1
fi
# Read the generated PKCS#12 (PFX) file to verify its contents
echo -e "\nVerifying contents of generated PKCS#12 (PFX) file ($CERT_DIR/test.pfx):"
if ! openssl pkcs12 -in "$CERT_DIR/test.pfx" -noout -info -password pass:"s3cr3t"; then
echo "ERROR: Failed to read PKCS#12 (PFX) file." >&2
exit 1
fi