October 18, 2020
Azure app service ssl certificates do not have a password but other Azure services only allow importing of certificates with passwords set. So this is the openssl snippet required to export the certificate and add a password
First you need to get the cert out of Azure keyvault. There is an export/download function for this on Azure.
Once you have the file you will need openssl.
openssl pkcs12 -in myappservicecertificate.pfx -out tmpmycert.pem -nodes
It might prompt you for a password here which is blank. Just hit enter.
openssl pkcs12 -export -out mypasswordedcert.pfx -in tmpmycert.pem
Now you will be prompted to enter the new password.
Hi! I'm Darragh ORiordan.
I live and work in Sydney, Australia enjoying the mountains and the ocean.
I build and support happy teams that create high quality software for the web.
Contact me on Twitter!