Skip to content

Commit df6391c

Browse files
GDIBassdriesvints
andauthored
[6.x] Pass ssl-no-verify option into latestVersion of ChromeDriver install (#794)
* #793 - Pass ssl-no-verify option into latestVersion * #793 - Fix styleCI quotes * Update ChromeDriverCommand.php * Update ChromeDriverCommand.php Co-authored-by: Dries Vints <[email protected]>
1 parent 7bd1e77 commit df6391c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Console/ChromeDriverCommand.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,18 @@ protected function version()
165165
*/
166166
protected function latestVersion()
167167
{
168-
return trim(file_get_contents($this->latestVersionUrl));
168+
$streamOptions = [];
169+
170+
if ($this->option('ssl-no-verify')) {
171+
$streamOptions = [
172+
'ssl' => [
173+
'verify_peer' => false,
174+
'verify_peer_name' => false,
175+
],
176+
];
177+
}
178+
179+
return trim(file_get_contents($this->latestVersionUrl, false, stream_context_create($streamOptions)));
169180
}
170181

171182
/**

0 commit comments

Comments
 (0)