curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it.

C++
// add the -k swith to disable ssl verification 
curl -k https://www.mywebsite.com
Source

Also in C++: