Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit ee82f9e

Browse files
kayhadrinjuliemr
authored andcommitted
feat(webdriver-manager): ignore ssl checks with --ignore_ssl option
Allow ability to ignore SSL checks when downloading webdriver binaries. Usage: `webdriver-manager update --ignore_ssl`
1 parent 6986ac4 commit ee82f9e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

bin/webdriver-manager

+10-2
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ var cli = optimist.
8686
describe('out_dir', 'Location to output/expect ').
8787
default('out_dir', SELENIUM_DIR).
8888
describe('seleniumPort', 'Optional port for the selenium standalone server').
89-
describe('proxy', 'proxy to use for the install or update command');
89+
describe('ignore_ssl', 'Ignore SSL certificates').boolean('ignore_ssl').
90+
default('ignore_ssl', false).
91+
describe('proxy', 'Proxy to use for the install or update command');
9092

9193
for (bin in binaries) {
92-
cli.describe(bin, 'install or update ' + binaries[bin].name).
94+
cli.describe(bin, 'Install or update ' + binaries[bin].name).
9395
boolean(bin).
9496
default(bin, binaries[bin].isDefault);
9597
}
@@ -126,9 +128,15 @@ var httpGetFile = function(fileUrl, fileName, outputDir, callback) {
126128
console.log('downloading ' + fileUrl + '...');
127129
var filePath = path.join(outputDir, fileName);
128130
var file = fs.createWriteStream(filePath);
131+
var ignoreSSL = argv.ignore_ssl;
132+
133+
if (ignoreSSL) {
134+
console.log('Ignoring SSL certificate');
135+
}
129136

130137
var options = {
131138
url: fileUrl,
139+
strictSSL: !ignoreSSL,
132140
proxy: resolveProxy(fileUrl)
133141
}
134142
request(options, function (error, response) {

0 commit comments

Comments
 (0)