Exporting PKCS7 certificate to Azure

An SSL certificate can be directly exported into azure, it needs to be converted into PEM first and then PFX.

So for converting it to PEM:

openssl pkcs7 -print_certs -in cert.cer -out certificate.crt

After that, the PEM can be exported into PFX by doing (all in one line):

openssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt

You need the private key that was created during the CSR generation.

And voila, enter a password, Azure requires one, and you are good to go.