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

Commit

Permalink
feat(webdriver-manager): ignore ssl checks with --ignore_ssl option
Browse files Browse the repository at this point in the history
Allow ability to ignore SSL checks when downloading webdriver binaries.
Usage: `webdriver-manager update --ignore_ssl`
  • Loading branch information
kayhadrin authored and juliemr committed Sep 5, 2014
1 parent 6986ac4 commit ee82f9e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/webdriver-manager
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ var cli = optimist.
describe('out_dir', 'Location to output/expect ').
default('out_dir', SELENIUM_DIR).
describe('seleniumPort', 'Optional port for the selenium standalone server').
describe('proxy', 'proxy to use for the install or update command');
describe('ignore_ssl', 'Ignore SSL certificates').boolean('ignore_ssl').
default('ignore_ssl', false).
describe('proxy', 'Proxy to use for the install or update command');

for (bin in binaries) {
cli.describe(bin, 'install or update ' + binaries[bin].name).
cli.describe(bin, 'Install or update ' + binaries[bin].name).
boolean(bin).
default(bin, binaries[bin].isDefault);
}
Expand Down Expand Up @@ -126,9 +128,15 @@ var httpGetFile = function(fileUrl, fileName, outputDir, callback) {
console.log('downloading ' + fileUrl + '...');
var filePath = path.join(outputDir, fileName);
var file = fs.createWriteStream(filePath);
var ignoreSSL = argv.ignore_ssl;

if (ignoreSSL) {
console.log('Ignoring SSL certificate');
}

var options = {
url: fileUrl,
strictSSL: !ignoreSSL,
proxy: resolveProxy(fileUrl)
}
request(options, function (error, response) {
Expand Down

0 comments on commit ee82f9e

Please sign in to comment.