How to import a SSL/TLS certificate in PFX format

The key steps are:

  1. Convert the PFX file to PEM:

openssl pkcs12 -in myCert.pfx -nocerts -out privateKey.pem

  1. Remove the passphrase if there is one on the above:

openssl rsa -in privateKey.pem -out private.rsakey

  1. Extract the public certificate chain
    openssl pkcs12 -in myCert.pfx -info

The certificate can then be uploaded via the portal or API (How to upload a custom certificate via the API)