Re: [PHP-WIN] fsockopen - certificate verify failed - how to importcertificate /disable the check

[email protected] (Christoph Becker) Wed, 17 Feb 2016 13:15:47 +0100
Newsgroups php.windows
Message-ID <[email protected]>
Martin Tille wrote:

> I tried different things with no luck. I started with an empty
> cacert.pem file to check if it is used. Yes it is. I copied the
> certificate for my server from the firefox certificate store, still my
> server didn't worked and then it complains when trying to connect to
> ssl://google.com what was working before.
> When I use the cacert.pem from https://curl.haxx.se/docs/caextract.html
> and test ssl://google.com and other servers these went well but not my
> self signed server which certificate I added at the bottom of the
> downloaded file.

There may be a bug, which you can report on <https://bugs.php.net/> (if
that's not already happened).

> Dear PHP devolpers, if you change verify_peer from false to true per
> default then test if it works with self signed certificates.

Consider to contribute respective test cases, see
<http://qa.php.net/write-test.php>. :)

> If anybody stumbles upon this. You can't solve it with fsockopen because
> you can't set a stream context.

Consider to make a respective feature request on <https://bugs.php.net/>.

-- 
Christoph M. Becker