Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | oauthconnector-do_not_very_ssl_cert-1506312-1.patch | 704 bytes | Pisco |
Comments
Comment #1
Pisco CreditAttribution: Pisco commentedPlease test the attached patch.
Comment #2
Pisco CreditAttribution: 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 CreditAttribution: Pisco commentedThe problem does not appear in Ubuntu 10.04.4 LTS, so I guess this is a mac only problem.