-
-
Save damiankloip/10290331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/core/lib/Drupal/Core/Http/Client.php | |
+++ b/core/lib/Drupal/Core/Http/Client.php | |
@@ -20,28 +20,27 @@ class Client extends GuzzleClient { | |
* {@inheritdoc} | |
*/ | |
public function __construct(array $config = []) { | |
- $defaults = array( | |
+ $default_config = array( | |
'config' => array( | |
'curl' => array( | |
CURLOPT_TIMEOUT => 30, | |
CURLOPT_MAXREDIRS => 3, | |
), | |
- // Security consideration: we must not use the certificate authority file | |
- // shipped with Guzzle because it can easily get outdated if a certificate | |
- // authority is hacked. Instead, we rely on the certificate authority file | |
- // provided by the operating system which is more likely going to be | |
- // updated in a timely fashion. | |
- 'ssl' => array( | |
- 'certificate_authority' => 'system', | |
- ), | |
), | |
'defaults' => array( | |
+ // Security consideration: we must not use the certificate authority | |
+ // file shipped with Guzzle because it can easily get outdated if a | |
+ // certificate authority is hacked. Instead, we rely on the certificate | |
+ // authority file provided by the operating system which is more likely | |
+ // going to be updated in a timely fashion. This overrides the default | |
+ // path to the pem file bundled with Guzzle. | |
+ 'verify' => TRUE, | |
'headers' => array( | |
'User-Agent' => 'Drupal (+http://drupal.org/)', | |
), | |
), | |
); | |
- $config = NestedArray::mergeDeep($defaults, $config); | |
+ $config = NestedArray::mergeDeep($default_config, $config); | |
parent::__construct($config); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment