diff options
author | Brendan Ashworth <brendan.ashworth@me.com> | 2015-03-13 01:42:21 -0700 |
---|---|---|
committer | Brendan Ashworth <brendan.ashworth@me.com> | 2015-03-21 17:22:27 -0700 |
commit | 999fbe9d96cbdff9cd69f0d23c6671dc0d7f3e9e (patch) | |
tree | 0eb3b06ca58c8eab8998f8873324293c4eeef615 /test/parallel/test-crypto-binary-default.js | |
parent | 99c79f8d41c706ddcffed7137f971a6cb62e2230 (diff) | |
download | android-node-v8-999fbe9d96cbdff9cd69f0d23c6671dc0d7f3e9e.tar.gz android-node-v8-999fbe9d96cbdff9cd69f0d23c6671dc0d7f3e9e.tar.bz2 android-node-v8-999fbe9d96cbdff9cd69f0d23c6671dc0d7f3e9e.zip |
test: fix crypto-binary-default bad crypto check
This commit fixes a small bug introduced in 671fbd5
that caused the test to not be run. crypto was properly
checked, but since tls was not imported, a TypeError
would be thrown in the `try {} catch {}` block and
falsely reported as no crypto.
This is now fixed.
PR-URL: https://github.com/iojs/io.js/pull/1141
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'test/parallel/test-crypto-binary-default.js')
-rw-r--r-- | test/parallel/test-crypto-binary-default.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 2efd3fa519..dced723093 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -11,6 +11,7 @@ if (!common.hasCrypto) { process.exit(); } var crypto = require('crypto'); +var tls = require('tls'); crypto.DEFAULT_ENCODING = 'binary'; @@ -27,18 +28,6 @@ var rsaPubPem = fs.readFileSync(common.fixturesDir + '/test_rsa_pubkey.pem', var rsaKeyPem = fs.readFileSync(common.fixturesDir + '/test_rsa_privkey.pem', 'ascii'); -// TODO(indutny): Move to a separate test eventually -try { - var context = tls.createSecureContext({ - key: keyPem, - cert: certPem, - ca: caPem - }); -} catch (e) { - console.log('Not compiled with OPENSSL support.'); - process.exit(); -} - // PFX tests assert.doesNotThrow(function() { tls.createSecureContext({pfx:certPfx, passphrase:'sample'}); |