From 0570308aaa471ee15b23f02cf9576717d2c96de5 Mon Sep 17 00:00:00 2001 From: lbunschoten Date: Fri, 11 Apr 2014 09:57:01 +0200 Subject: [PATCH] CB-5847 strictSSL is no longer ignored --- src/lazy_load.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lazy_load.js b/src/lazy_load.js index 1b8df0085..5038ec124 100644 --- a/src/lazy_load.js +++ b/src/lazy_load.js @@ -74,11 +74,14 @@ module.exports = { npmconf.load(function(err, conf) { // Check if NPM proxy settings are set. If so, include them in the request() call. var proxy; + var strictSSL; if (uri.protocol == 'https:') { proxy = conf.get('https-proxy'); } else if (uri.protocol == 'http:') { proxy = conf.get('proxy'); } + + strictSSL = conf.get('strict-ssl'); // Create a tmp dir. Using /tmp is a problem because it's often on a different partition and sehll.mv() // fails in this case with "EXDEV, cross-device link not permitted". @@ -92,6 +95,9 @@ module.exports = { if (proxy) { request_options.proxy = proxy; } + if (typeof strictSSL == 'boolean') { + request_options.strictSSL = strictSSL; + } events.emit('verbose', 'Requesting ' + JSON.stringify(request_options) + '...'); events.emit('log', 'Downloading ' + id + ' library for ' + platform + '...'); var req = request.get(request_options, function(err, res, body) {