mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-24 10:03:27 +01:00
Code added to resolve issue 1256
This commit is contained in:
parent
90d7d39a97
commit
52e099d3ec
@ -359,6 +359,7 @@ class StreamHandler
|
||||
}
|
||||
} elseif ($value === false) {
|
||||
$options['ssl']['verify_peer'] = false;
|
||||
$options['ssl']['verify_peer_name'] = false;
|
||||
return;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid verify request option');
|
||||
|
@ -245,6 +245,7 @@ class StreamHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
$res = $this->getSendResult(['verify' => $path]);
|
||||
$opts = stream_context_get_options($res->getBody()->detach());
|
||||
$this->assertEquals(true, $opts['ssl']['verify_peer']);
|
||||
$this->assertEquals(true, $opts['ssl']['verify_peer_name']);
|
||||
$this->assertEquals($path, $opts['ssl']['cafile']);
|
||||
$this->assertTrue(file_exists($opts['ssl']['cafile']));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user