Curl SSL on Windows

While played with azure found way to get rid of annoing ssl verification erros in curl here

All you need to do:

Download pem file from http://curl.haxx.se/docs/caextract.html somewhere to local drive

In you code use it like so:

curl_setopt($ch, CURLOPT_CAINFO, "C:/inetpub/wwwroot/cacert.pem");

And one more example for guzzle:

$this->client = new Client([
    'base_url' => 'https://testrus.search.windows.net/',
    'defaults' => [
        'verify' => 'C:/inetpub/wwwroot/cacert.pem',
        'headers' => [
            'Content-Type' => 'application/json; charset=utf-8',
            'api-key' => '********************************'
        ],
        'query' => ['api-version' => '2015-02-28-Preview']
    ]
]);