diff --git a/scripts/convert-pfx-cert-format.sh b/scripts/convert-pfx-cert-format.sh index c98528b6dc..4615dbdf85 100755 --- a/scripts/convert-pfx-cert-format.sh +++ b/scripts/convert-pfx-cert-format.sh @@ -29,6 +29,8 @@ done ( [ -z $PFX_FILE ] || [ -z $SIGNING_KEY ] || [ -z $SIGNING_CERT ] || [ -z $CA_CERT ] ) && exit 1 -openssl pkcs12 -in "${PFX_FILE}" -clcerts -nokeys -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN CERTIFICATE\)/\1/" > ${SIGNING_CERT} -openssl pkcs12 -in "${PFX_FILE}" -nocerts -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN PRIVATE KEY\)/\1/" > ${SIGNING_KEY} +openssl pkcs12 -in "${PFX_FILE}" -clcerts -nokeys -nodes -passin pass: -out ${SIGNING_CERT} +openssl pkcs12 -in "${PFX_FILE}" -nocerts -nodes -passin pass: -out ${SIGNING_KEY} + +# Export the last intermediate CA ceritficate openssl pkcs12 -in "${PFX_FILE}" -cacerts -nokeys -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN CERTIFICATE\)/\1/" > ${CA_CERT}