Skip to content

Commit

Permalink
get rid of more dangerous ssl settings in examples. #217
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Dec 28, 2017
1 parent 4150a00 commit da5eb18
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion clients/curl-client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ You can use `cURL options <http://php.net/curl_setopt>`_ to configure Client::

$options = [
CURLOPT_CONNECTTIMEOUT => 10, // The number of seconds to wait while trying to connect.
CURLOPT_SSL_VERIFYPEER => false // Stop cURL from verifying the peer's certificate
];
$client = new Client(MessageFactoryDiscovery::find(), StreamFactoryDiscovery::find(), $options);

Expand Down
3 changes: 1 addition & 2 deletions clients/guzzle6-adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ to the client::
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;

$config = [
'verify' => false,
'timeout' => 2,
'handler' => //...
// ...
Expand All @@ -37,7 +36,7 @@ to the client::
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;

$config = ['verify' => false ];
$config = ['timeout' => 5];
// ...
$guzzle = new GuzzleClient($config);
// ...
Expand Down
3 changes: 1 addition & 2 deletions integrations/symfony-bundle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Usage
factory: 'httplug.factory.guzzle6'
plugins: ['httplug.plugin.logger']
config:
verify: false
timeout: 2
.. code-block:: php
Expand Down Expand Up @@ -177,7 +176,7 @@ services.
config:
# These options are given to Guzzle without validation.
defaults:
verify_ssl: false
# timeout if connection is not established after 4 seconds
timeout: 4
acme:
factory: 'httplug.factory.curl'
Expand Down
1 change: 0 additions & 1 deletion integrations/symfony-full-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ This page shows an example of all configuration values provided by the bundle.
http_methods_client: false # Can only be true if flexible_client is false
config:
# Options to the Guzzle 6 constructor
verify: false
timeout: 2
plugins:
# Can reference a globally configured plugin service
Expand Down

0 comments on commit da5eb18

Please sign in to comment.