summaryrefslogtreecommitdiff
path: root/test/pummel
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-08-30 16:43:20 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-09-15 00:19:30 +0200
commit3806cf0d640da3024d50208452d2dd9e3cb015d2 (patch)
tree846352a0e26e9d58ac529c127c7d72cce34ae4c9 /test/pummel
parent35607f3a2dda03af8cf2dd3704c0c915e28aa774 (diff)
downloadnode-new-3806cf0d640da3024d50208452d2dd9e3cb015d2.tar.gz
test: set rejectUnauthorized in tls/https tests
Update the tls and https tests to explicitly set rejectUnauthorized instead of relying on the NODE_TLS_REJECT_UNAUTHORIZED environment variable getting set.
Diffstat (limited to 'test/pummel')
-rw-r--r--test/pummel/test-https-large-response.js8
-rw-r--r--test/pummel/test-tls-throttle.js8
2 files changed, 8 insertions, 8 deletions
diff --git a/test/pummel/test-https-large-response.js b/test/pummel/test-https-large-response.js
index 23a836081c..370415dcb7 100644
--- a/test/pummel/test-https-large-response.js
+++ b/test/pummel/test-https-large-response.js
@@ -19,9 +19,6 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
-// disable strict server certificate validation by the client
-process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
-
var common = require('../common');
var assert = require('assert');
@@ -53,7 +50,10 @@ var count = 0;
var gotResEnd = false;
server.listen(common.PORT, function() {
- https.get({ port: common.PORT }, function(res) {
+ https.get({
+ port: common.PORT,
+ rejectUnauthorized: false
+ }, function(res) {
console.log('response!');
res.on('data', function(d) {
diff --git a/test/pummel/test-tls-throttle.js b/test/pummel/test-tls-throttle.js
index cfe7d737f9..a7119944ad 100644
--- a/test/pummel/test-tls-throttle.js
+++ b/test/pummel/test-tls-throttle.js
@@ -22,9 +22,6 @@
// Server sends a large string. Client counts bytes and pauses every few
// seconds. Makes sure that pause and resume work properly.
-// disable strict server certificate validation by the client
-process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
-
var common = require('../common');
var assert = require('assert');
var tls = require('tls');
@@ -56,7 +53,10 @@ var server = tls.Server(options, function(socket) {
var recvCount = 0;
server.listen(common.PORT, function() {
- var client = tls.connect(common.PORT);
+ var client = tls.connect({
+ port: common.PORT,
+ rejectUnauthorized: false
+ });
client.on('data', function(d) {
process.stdout.write('.');