Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/ReCaptcha/RequestMethod/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public function submit(RequestParameters $params)
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => $params->toQueryString(),
// Force the peer to validate (not needed in 5.6.0+, but still works)
],
// Force the peer to validate (not needed in 5.6.0+, but still works)
'ssl' => [
'verify_peer' => true,
],
];
Expand Down
6 changes: 3 additions & 3 deletions tests/ReCaptcha/RequestMethod/PostTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public function sslContextOptionsCallback(array $args)
$this->assertCommonOptions($args);

$options = stream_context_get_options($args[2]);
$this->assertArrayHasKey('http', $options);
$this->assertArrayHasKey('verify_peer', $options['http']);
$this->assertTrue($options['http']['verify_peer']);
$this->assertArrayHasKey('ssl', $options);
$this->assertArrayHasKey('verify_peer', $options['ssl']);
$this->assertTrue($options['ssl']['verify_peer']);
}

protected function assertCommonOptions(array $args)
Expand Down
Loading