0

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

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.