diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-tls-client-default-ciphers.js | 14 | ||||
-rw-r--r-- | test/parallel/test-tls-close-notify.js | 4 | ||||
-rw-r--r-- | test/parallel/test-tls-multi-key.js | 5 |
3 files changed, 15 insertions, 8 deletions
diff --git a/test/parallel/test-tls-client-default-ciphers.js b/test/parallel/test-tls-client-default-ciphers.js index 1eb74e6981..dfae4a7bb9 100644 --- a/test/parallel/test-tls-client-default-ciphers.js +++ b/test/parallel/test-tls-client-default-ciphers.js @@ -2,13 +2,21 @@ var assert = require('assert'); var common = require('../common'); var tls = require('tls'); +function Done() {} + function test1() { var ciphers = ''; + tls.createSecureContext = function(options) { - ciphers = options.ciphers + ciphers = options.ciphers; + throw new Done(); + } + + try { + var s = tls.connect(common.PORT); + } catch (e) { + assert(e instanceof Done); } - var s = tls.connect(common.PORT); - s.destroy(); assert.equal(ciphers, tls.DEFAULT_CIPHERS); } test1(); diff --git a/test/parallel/test-tls-close-notify.js b/test/parallel/test-tls-close-notify.js index 54f7314e2f..c5decad5e5 100644 --- a/test/parallel/test-tls-close-notify.js +++ b/test/parallel/test-tls-close-notify.js @@ -17,8 +17,8 @@ var server = tls.createServer({ cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') }, function(c) { // Send close-notify without shutting down TCP socket - if (c.ssl.shutdown() !== 1) - c.ssl.shutdown(); + if (c._handle.shutdownSSL() !== 1) + c._handle.shutdownSSL(); }).listen(common.PORT, function() { var c = tls.connect(common.PORT, { rejectUnauthorized: false diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index cdf8500874..657d9084d4 100644 --- a/test/parallel/test-tls-multi-key.js +++ b/test/parallel/test-tls-multi-key.js @@ -28,15 +28,14 @@ var server = tls.createServer(options, function(conn) { ciphers: 'ECDHE-ECDSA-AES256-GCM-SHA384', rejectUnauthorized: false }, function() { + ciphers.push(ecdsa.getCipher()); var rsa = tls.connect(common.PORT, { ciphers: 'ECDHE-RSA-AES256-GCM-SHA384', rejectUnauthorized: false }, function() { + ciphers.push(rsa.getCipher()); ecdsa.destroy(); rsa.destroy(); - - ciphers.push(ecdsa.getCipher()); - ciphers.push(rsa.getCipher()); server.close(); }); }); |