Browse Source

Merge pull request #6403 from cakephp/fix-ssl-cert-file

Fix ssl cert file
Mark Story 11 years ago
parent
commit
11bc4bd688

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

@@ -229,7 +229,7 @@ class Stream
             'ssl_passphrase',
         ];
         if (empty($options['ssl_cafile'])) {
-            $options['ssl_cafile'] = CAKE . 'config' . DS . 'cacert.pem';
+            $options['ssl_cafile'] = CORE_PATH . 'config' . DS . 'cacert.pem';
         }
         if (!empty($options['ssl_verify_host'])) {
             $url = $request->url();

+ 1 - 0
tests/TestCase/Network/Http/Adapter/StreamTest.php

@@ -171,6 +171,7 @@ class StreamTest extends TestCase
         foreach ($expected as $k => $v) {
             $this->assertEquals($v, $result[$k]);
         }
+        $this->assertTrue(is_readable($result['cafile']));
     }
 
     /**