'Valid leaf certificate in PEM format

I am troubleshooting an SSL certificate issue where after the.PFX conversion to.PEM file using the OpenSSL.

The certificate is from Azure App Service Managed Certificate (GoDaddy) for 1-year validity with auto-renewal. https://azure.github.io/AppService/2021/05/25/App-Service-Managed-Certificate-GA.html

According to https://developer.americanexpress.com/documentation#certificate-requirements I just need to execute:

openssl pkcs12 -in certificatename.pfx -out certificatename.pem

Which I have done with no issue or error.

However, it is always throwing errors when uploaded to the Amex portal.

Error:

Please upload a valid leaf certificate in PEM format


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source