Browse Source

add ssl_verify_peer_name;

See https://github.com/cakephp/cakephp/issues/8471;
Curtis Gibby 10 years ago
parent
commit
339bbe7ccc
2 changed files with 4 additions and 0 deletions
  1. 1 0
      src/Network/Http/Adapter/Stream.php
  2. 3 0
      src/Network/Http/Client.php

+ 1 - 0
src/Network/Http/Adapter/Stream.php

@@ -225,6 +225,7 @@ class Stream
     {
         $sslOptions = [
             'ssl_verify_peer',
+            'ssl_verify_peer_name',
             'ssl_verify_depth',
             'ssl_allow_self_signed',
             'ssl_cafile',

+ 3 - 0
src/Network/Http/Client.php

@@ -104,6 +104,7 @@ class Client
         'scheme' => 'http',
         'timeout' => 30,
         'ssl_verify_peer' => true,
+        'ssl_verify_peer_name' => true,
         'ssl_verify_depth' => 5,
         'ssl_verify_host' => true,
         'redirect' => false,
@@ -140,6 +141,8 @@ class Client
      * - timeout - The timeout in seconds. Defaults to 30
      * - ssl_verify_peer - Whether or not SSL certificates should be validated.
      *   Defaults to true.
+     * - ssl_verify_peer_name - Whether or not peer names should be validated.
+     *   Defaults to true.
      * - ssl_verify_depth - The maximum certificate chain depth to travers.
      *   Defaults to 5.
      * - ssl_verify_host - Verify that the certificate and hostname match.