Reputation: 1
I am unable to upload a specific .pem certificate to Azure Key Vault. Error: "The specified PEM X.509 certificate content is in an unexpected format. Please check if certificate is in valid PEM format. But I am able to use the same certificate to connect to the endpoint (using Curl). I get this error when I try to upload to AKV only and only this certificate has the issue.
Any pointers to help solve this problem is very much appreciated.
Regards, Joby
Upvotes: 0
Views: 174
Reputation: 85
AKV is very finicky about formatting when it comes to certs and keys. If openssl has added any content (including line breaks and special characters) outside of the -----BEGIN CERTIFICATE-----
and -----END CERTIFICATE-----
marks I would try removing that. If you're using Terraform, I would recommend generating your certs with the azurerm_key_vault_certificate
resource.
Upvotes: 0