Can't import pem certificate in key vault
I'm trying to add a .pem certificate to my key vault, it seems to work but when I try to add the certificate to my CDN secrets I get the following error:
Failed to create the secret 'mykeyvault-webcertificate-latest'. Error: The secret contains an unsupported content type. The content type needs to be application/x-pkcs12.
Then I tried to export the certificate using openssl command:
sudo openssl pkcs12 -export -out certificate.pfx -inkey live/www.mydomain.com/privkey.pem -in live/www.mydomain.com/fullchain.pem
but when I try to import it into my key vault I get the following error:
Upload Error for certificate.pfxAn error occurred when reading certificate.pfx file.
the certificates were generated with certbot (the CA is letsencrypt).
Can anyone help me please? Thanks in advance