Skip to content

Instantly share code, notes, and snippets.

View cn137's full-sized avatar

Salman Butt cn137

  • 10:17 (UTC -05:00)
View GitHub Profile
@whereisaaron
whereisaaron / pfx-to-crt-and-key.sh
Last active March 5, 2024 18:13
Extract a crt file (PEM), key file, and chain bundle from a PFX file, prompts for password or use PFXPASSWORD environment variable
#!/bin/bash
#------------------
# Extract the key, certficiate, and chain in PEM format from a PFX format file
#
# Must supply the input pfx file
PFX_PATH="$1"
if [ "${PFX_PATH}" == "" ]; then
echo "Must supply pfx file path"
exit 1