Can't import pem certificate in key vault

Christian D Alessandro 5 Reputation points
2024-01-10T22:33:10.5733333+00:00

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

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,135 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
587 questions
{count} vote