Background
Recently I hosted a REST API on Azure. The API was used by a PHP based application hosted externally by an external party. I used an SSL certificate purchased from DigiCert for creating the HTTPS endpoint. I was getting no errors on the web browsers such as Chrome, Mozilla and on command line interfaces like powershell, command prompt, Linux terminal etc using CURL command.
But I was getting an error “Unable to verify the first certificate” while accessing this API using postman. Also the PHP app was giving another error “curl: (60) SSL certificate problem: unable to get local issuer certificate”.
Solution
I merged the Intermediate Certificate Chain and the certificate together. The process is simple. I just opened the certificate using a Notepad and added the Certificate chain to the certificate file. It solved the problem. After uploading the certificate, the error disappeared. Hope this is helpful.
