diff --git a/includes/common.inc b/includes/common.inc
index ceac115..f7220de 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -875,6 +875,17 @@ function drupal_http_request($url, array $options = array()) {
       $port = isset($uri['port']) ? $uri['port'] : 443;
       $socket = 'ssl://' . $uri['host'] . ':' . $port;
       $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');
+      // By default, verify SSL certificates in OpenSSL connections. This is
+      // enabled by default in PHP 5.6, older versions do not enable it
+      // automatically.
+      if (!isset($options['context'])) {
+        $opts = array(
+          'ssl' => array(
+            'verify_peer' => FALSE,
+          ),
+        );
+        $options['context'] = stream_context_create($opts);
+      }
       break;
 
     default:
