Skip to content

Instantly share code, notes, and snippets.

@mbomb007
mbomb007 / pfx-extract.sh
Last active January 3, 2024 20:23 — forked from whereisaaron/pfx-to-crt-and-key.sh
Extract a crt, key, pem, and chain bundle from a PFX file, prompts for password or use PFXPASSWORD environment variable
#!/bin/bash
#------------------
# Extract the key, pem, certficiate, and chain from a PFX file
#
# https://gist.github.com/mbomb007/68e4e662027c72736826f1abf7b2cde9
#
# Must supply the input pfx file
PFX_PATH="$1"
if [ "${PFX_PATH}" == "" ]; then