Problem/Motivation
With an OAauth provider added from the Facebook preset, you get the following error when trying to use it:
Unknown SSL protocol error in connection to graph.facebook.com:443
I am using PHP 5.3.10 and curl 7.24.0.
As described on stackoverflow, this error stems from a timeout, because curl tries to verify the SSL certificate of the server it is connecting to. This seems to be the default as of cURL 7.10, see the PHP manual: http://php.net/manual/en/function.curl-setopt.php
Proposed resolution
In DrupalOAuth2Client.inc set the following option:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
Patch follows in a sec.
Comments
Comment #1
Pisco commentedPlease test the attached patch.
Comment #2
Pisco commentedSorry, the patch did not solve the problem, I don't know why it temporarily worked after the change. It could well be that this is a problem on the Mac with MacPorts: http://trac.macports.org/ticket/33715
I'll test on another system.
Comment #3
Pisco commentedThe problem does not appear in Ubuntu 10.04.4 LTS, so I guess this is a mac only problem.