test: add hasCrypto check to tls-legacy-deprecated

Currently test-tls-legacy-deprecated will fail if node
was built using --without-ssl. This commit adds a check to
verify is crypto support exists and if not skip this test.

PR-URL: https://github.com/nodejs/node/pull/11747
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Daniel Bevenius 2017-03-08 13:39:57 +01:00
parent e2f151f5b2
commit b98004b79c

View File

@ -1,6 +1,10 @@
// Flags: --no-warnings
'use strict';
const common = require('../common');
if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
const assert = require('assert');
const tls = require('tls');