Created
March 31, 2025 06:26
-
-
Save ripsnortntear/251d57c9a31e550bffb68291d21bc4f9 to your computer and use it in GitHub Desktop.
This script converts an SSL certificate and its private key into a PFX file format, specifying output paths and a password for the PFX file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define paths | |
CERT_PATH="/path/to/cert.pem" | |
KEY_PATH="/path/to/key.pem" | |
PFX_PATH="/path/to/output.pfx" | |
PFX_PASSWORD="your_password" # Set a password for the PFX file | |
# Create the PFX file | |
openssl pkcs12 -export -out "$PFX_PATH" -inkey "$KEY_PATH" -in "$CERT_PATH" -passout pass:"$PFX_PASSWORD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment