Comparing version 2.3.2 to 2.3.3
2.3.3 / 2015-03-30 | ||
================== | ||
* fix: add ciphers and secureProtocol params support for https request | ||
2.3.2 / 2015-03-29 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -105,2 +105,5 @@ /**! | ||
* - {String} [passphrase]: A string of passphrase for the private key or pfx. | ||
* - {String} [ciphers]: A string describing the ciphers to use or exclude. | ||
* - {String} [secureProtocol]: The SSL method to use, e.g. SSLv3_method to force SSL version 3. | ||
* The possible values depend on your installation of OpenSSL and are defined in the constant SSL_METHODS. | ||
* - {Boolean} [followRedirect]: Follow HTTP 3xx responses as redirects. defaults to false. | ||
@@ -207,6 +210,16 @@ * - {Number} [maxRedirects]: The maximum number of redirects to follow, defaults to 10. | ||
var sslNames = ['ca', 'pfx', 'key', 'cert', 'passphrase']; | ||
var sslNames = [ | ||
'pfx', | ||
'key', | ||
'passphrase', | ||
'cert', | ||
'ca', | ||
'ciphers', | ||
'rejectUnauthorized', | ||
'secureProtocol', | ||
'secureOptions', | ||
]; | ||
for (var i = 0; i < sslNames.length; i++) { | ||
var name = sslNames[i]; | ||
if (args[name]) { | ||
if (args.hasOwnProperty(name)) { | ||
options[name] = args[name]; | ||
@@ -216,8 +229,4 @@ } | ||
if (args.rejectUnauthorized !== undefined) { | ||
options.rejectUnauthorized = args.rejectUnauthorized; | ||
} | ||
// don't check ssl | ||
if (options.rejectUnauthorized === false) { | ||
if (options.rejectUnauthorized === false && !options.hasOwnProperty('secureOptions')) { | ||
options.secureOptions = require('constants').SSL_OP_NO_TLSv1_2; | ||
@@ -224,0 +233,0 @@ } |
{ | ||
"name": "urllib", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -158,2 +158,4 @@ # urllib | ||
- ***passphrase*** String - A string of passphrase for the private key or pfx. | ||
- ***ciphers*** String - A string describing the ciphers to use or exclude. | ||
- ***secureProtocol*** String - The SSL method to use, e.g. SSLv3_method to force SSL version 3. | ||
- ***followRedirect*** Boolean - follow HTTP 3xx responses as redirects. defaults to false. | ||
@@ -160,0 +162,0 @@ - ***maxRedirects*** Number - The maximum number of redirects to follow, defaults to 10. |
44544
646
324