diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-10 15:37:06 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-10 15:37:06 -0700 |
commit | b1a68e15b760aa2e588680c9e8c7526a7a6d1d13 (patch) | |
tree | 6100f1aa00f9930433f178173099c0ce67fdc502 /lib/httpclient.php | |
parent | 7cc58b97feb822ab999b7fefa3a50ce53a7838d5 (diff) | |
parent | e121d472e7dbb914a85b10bde0a9e2add4d19d11 (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
lib/default.php
lib/util.php
plugins/UrlShortener/UrlShortenerPlugin.php (has been removed?)
Diffstat (limited to 'lib/httpclient.php')
-rw-r--r-- | lib/httpclient.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/httpclient.php b/lib/httpclient.php index 384626ae0..b69f718e5 100644 --- a/lib/httpclient.php +++ b/lib/httpclient.php @@ -132,7 +132,19 @@ class HTTPClient extends HTTP_Request2 // ought to be investigated to see if we can handle // it gracefully in that case as well. $this->config['protocol_version'] = '1.0'; - + + // Default state of OpenSSL seems to have no trusted + // SSL certificate authorities, which breaks hostname + // verification and means we have a hard time communicating + // with other sites' HTTPS interfaces. + // + // Turn off verification unless we've configured a CA bundle. + if (common_config('http', 'ssl_cafile')) { + $this->config['ssl_cafile'] = common_config('http', 'ssl_cafile'); + } else { + $this->config['ssl_verify_peer'] = false; + } + parent::__construct($url, $method, $config); $this->setHeader('User-Agent', $this->userAgent()); } |