cURL error 60 while using the GuzzleHttp
<p>I would like to get rid of this error. I read a <a href="https://stackoverflow.com/questions/24923604/guzzle-curl-error-60-ssl-unable-to-get-local-issuer">similar question</a> where one answer suggested that I can disable the verification using:</p>
<pre><code>$client-&gt;setDefaultOption('verify', false);
</code></pre>
<p>My exact error is:</p>
<blockquote>
<p>Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate (see <a href="http://curl.haxx.se/libcurl/c/libcurl-errors.html" rel="nofollow noreferrer">http://curl.haxx.se/libcurl/c/libcurl-errors.html</a>)' in C:\path\guzzle\src\Handler\CurlFactory.php:187 Stack trace: #0 C:\path\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1</p>
<p>C:\path\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2</p>
<p>C:\path\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Hand in C:\path\guzzle\src\Handler\CurlFactory.php on line 187</p>
</blockquote>
<p>I read the code of all these lines and there is no variable like <code>$client</code> there but I found this function inside <code>CurlFactory.php</code>. Please note the file <code>CurlFactory.php</code> was not created by me.</p>
<pre><code>public function release(EasyHandle $easy)
{
    $resource = $easy-&gt;handle;
    unset($easy-&gt;handle);

    if (count($this-&gt;handles) &gt;= $this-&gt;maxHandles) {
        curl_close($resource);
    } else {
        // Remove all callback functions as they can hold onto references
        // and are not cleaned up by curl_reset. Using curl_setopt_array
        // does not work for some reason, so removing each one
        // individually.
        curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
        curl_setopt($resource, CURLOPT_READFUNCTION, null);
        curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
        curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
        curl_reset($resource);
        $this-&gt;handles[] = $resource;
    }
}
</code></pre>
<p>Can I set the option to disable verification here?</p>
<p>I know it is not a good idea to disable verification but the code is for personal use and to test something. It is no problem if I disable the verification. Here is the code in my actual PHP file.</p>
<pre><code>require('vendor/autoload.php');
use JonathanTorres\MediumSdk\Medium;

$medium = new Medium('my-key');

$user = $medium-&gt;getAuthenticatedUser();
echo 'Authenticated user name is: ' . $user-&gt;name;
</code></pre>
<p>As you can see, I am not using cURL in my code anywhere. The options need to be set inside the library somewhere. Is it possible to disable the verification in my own file instead of changing the source code of library?</p>