Add password to .p12/.pfx-certificate

With following procedure you can change your password on an .p12/.pfx certificate using openssl.

Export you current certificate to a passwordless pem type:

openssl pkcs12 -in mycert.pfx/mycert.p12 -out tmpmycert.pem -nodes
Enter Import Password: <Enter no password>
MAC verified OK

Convert the passwordless pem to a new pfx file with password:

openssl pkcs12 -export -out mycert2.pfx/mycert2.p12 -in tmpmycert.pem
Enter Export Password: <Enter password here>
Verifying - Enter Export Password: <Enter password here>

Now you are done and can use the new mycert2.pfx file with your new password.