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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pisco’s picture

Status: Active » Needs review
FileSize
704 bytes

Please test the attached patch.

Pisco’s picture

Sorry, 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.

Pisco’s picture

Priority: Major » Normal
Status: Needs review » Closed (won't fix)

The problem does not appear in Ubuntu 10.04.4 LTS, so I guess this is a mac only problem.