How to change p12 file password

Recen­tly I am wor­king on push noti­fi­ca­tions on both iOS and And­roid, and meet / solve a lot of pro­ble­ms on this. For the rea­son Java cou­ld not allow for empty passwo­rd on p12 files, we need to add a passwo­rd for non-passwo­rd p12 files.

Here is a common method to chan­ge p12 file passwo­rd. Just use two comman­ds of open­ssl on OS X:

  • open­ssl pkcs12 -in Certificates.p12 -out temp.pem -passin pass: -passout pass:temppassword
  • open­ssl pkcs12 -expo­rt -in temp.pem -out Certificates-final.p12 -passin pass:temppassword -passout pass:newpa­sswo­rd
  • rm -rf temp.pem

That’s it! Enjoy your coding on iOS!

You may also like...

1 Response

  1. Asghar says:

    How can we do in Win­do­ws OS, any IDEA?

Leave a Reply

Your email address will not be published.

four × 1 =

使用新浪微博登陆