josegonzalez/cakephp-upload — pull request #179 by Cruel (2013-12-12 02:09:40+00:00)
Title: Disable HttpSocket's ssl_verify_host

I'm no SSL guru, so you could perhaps leave this for debate if you want.

To replicate the problem, just try to use any SSL youtube thumbnail for remote download by the Upload Behavior.
(e.g. https://i1.ytimg.com/vi/kspPE9E1yGM/mqdefault.jpg)

```
Error: stream_socket_client(): Peer certificate CN=`*.google.com' did not match expected CN=`i1.ytimg.com'
```

This seems to be a general problem with CakePHP's HttpSocket (maybe even PHP itself) as discussed in one of their tickets: https://github.com/cakephp/cakephp/issues/2050

I can't bother to research it too much more, but disabling `ssl_verify_host` fixes the issues while still performing other SSL verification.