Nginx Curl SSL error

After installing SSL on Nginx server, it worked on browser, but when i try access using curl command, i get error

This is fixed by adding ca-bundle to .crt file.

The cert file should be in following format

YOUR_DOMAIN.crt
YOUR_DOMAIN.ca-bundle

This can be done with

Now use YOUR_DOMAIN.ssl as your ssl certificate in nginx.