Created
May 14, 2021 04:27
-
-
Save guitarrapc/1b5e000e500b63e98fd313f21ec6e46e to your computer and use it in GitHub Desktop.
export rsa private key and cert from pkcs (.p12) file. Used for Apple Push Notification Certificate extraction.
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 | |
for item in *.p12 | |
do | |
filename="${item%%.*}" | |
openssl pkcs12 -in "${item}" -nodes -nocerts -passin pass:"" | openssl rsa -out "${filename}-key.pem" | |
openssl pkcs12 -in "${item}" -nodes -nokeys -passin pass:"" | openssl x509 -out "${filename}-cert.pem" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use your password on pass