How to change p12 file password
Recently I am working on push notifications on both iOS and Android, and meet / solve a lot of problems on this. For the reason Java could not allow for empty password on p12 files, we need to add a password for non-password p12 files.
Here is a common method to change p12 file password. Just use two commands of openssl on OS X:
- openssl pkcs12 -in Certificates.p12 -out temp.pem -passin pass: -passout pass:temppassword
- openssl pkcs12 -export -in temp.pem -out Certificates-final.p12 -passin pass:temppassword -passout pass:newpassword
- rm -rf temp.pem
That’s it! Enjoy your coding on iOS!