summaryrefslogtreecommitdiff
path: root/test/parallel/test-https-strict.js
diff options
context:
space:
mode:
authorJohan Bergström <bugs@bergstroem.nu>2015-03-04 12:11:21 +1100
committerShigeki Ohtsu <ohtsu@iij.ad.jp>2015-03-05 10:31:41 +0900
commit671fbd5a9de03c5ede968ef6c6b365965a546a55 (patch)
tree771b3158d781911def96ffbd50bd9d4cad4b0077 /test/parallel/test-https-strict.js
parentc7ad320472d69962b48e10e564682f24dd31d1d1 (diff)
downloadandroid-node-v8-671fbd5a9de03c5ede968ef6c6b365965a546a55.tar.gz
android-node-v8-671fbd5a9de03c5ede968ef6c6b365965a546a55.tar.bz2
android-node-v8-671fbd5a9de03c5ede968ef6c6b365965a546a55.zip
test: refactor all tests that depends on crypto
we had a few ways versions of looking for support before executing a test. this commit unifies them as well as add the check for all tests that previously lacked them. found by running `./configure --without-ssl && make test`. also, produce tap skip output if the test is skipped. PR-URL: https://github.com/iojs/io.js/pull/1049 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Diffstat (limited to 'test/parallel/test-https-strict.js')
-rw-r--r--test/parallel/test-https-strict.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js
index e00cf90a0d..b2620fa88b 100644
--- a/test/parallel/test-https-strict.js
+++ b/test/parallel/test-https-strict.js
@@ -1,17 +1,17 @@
-if (!process.versions.openssl) {
- console.error('Skipping because node compiled without OpenSSL.');
- process.exit(0);
-}
-
// disable strict server certificate validation by the client
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
var common = require('../common');
var assert = require('assert');
+if (!common.hasCrypto) {
+ console.log('1..0 # Skipped: missing crypto');
+ process.exit();
+}
+var https = require('https');
+
var fs = require('fs');
var path = require('path');
-var https = require('https');
function file(fname) {
return path.resolve(common.fixturesDir, 'keys', fname);