tijsverkoyen/Dropbox — Issue #4: SSL Error: certificate verify failed
Author: schirkan
Created: 2012-01-04 21:46:56+00:00
State: open

If the Dropbox-SSL-certificate is not installed you will get the following error:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I use PEAR OAuth, but it is not possible to disable ssl verification.

Workaround in Dropbox_OAuth_PEAR::__construct()
_______________________________________________________________

public function __construct($consumerKey, $consumerSecret) {

if (!class_exists('HTTP_OAuth_Consumer')) {

// We're going to try to load in manually
include 'HTTP/OAuth/Consumer.php';

}
if (!class_exists('HTTP_OAuth_Consumer'))
throw new Dropbox_Exception('The HTTP_OAuth_Consumer class could not be found! Did you install the pear HTTP_OAUTH class?');

$this->OAuth = new HTTP_OAuth_Consumer($consumerKey, $consumerSecret);
$this->consumerKey = $consumerKey;

//-----------------------------------------------------------------
// BUGFIX for SLL Error: certificate verify failed
$httpRequest = new HTTP_Request2(null,
HTTP_Request2::METHOD_GET,
array(
'ssl_verify_peer' => false,
'ssl_verify_host' => false
)
);
$this->OAuth->accept($httpRequest);
//-----------------------------------------------------------------

}