mirror of https://github.com/nodejs/node.git
test: add missing crypto checks
Add a check for crypto before using it, similar to how other tests work. PR-URL: https://github.com/nodejs/io.js/pull/2129 Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
parent
ee3ce2ed88
commit
2ba1740ba1
|
@ -7,6 +7,13 @@
|
|||
// 0x44, 0xB5, 0x00, 0x76, 0x48, 0x11, 0x41, 0xED },
|
||||
// },
|
||||
// in src/CNNICHashWhitelist.inc
|
||||
|
||||
var common = require('../common');
|
||||
if (!common.hasCrypto) {
|
||||
console.log('1..0 # Skipped: missing crypto');
|
||||
process.exit();
|
||||
}
|
||||
|
||||
var tls = require('tls');
|
||||
var socket = tls.connect(443, 'www1.cnnic.cn', function() {
|
||||
socket.resume();
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
'use strict';
|
||||
// Test for authorized access to the server which has a cross root
|
||||
// certification between Starfield Class 2 and ValiCert Class 2
|
||||
|
||||
var common = require('../common');
|
||||
if (!common.hasCrypto) {
|
||||
console.log('1..0 # Skipped: missing crypto');
|
||||
process.exit();
|
||||
}
|
||||
|
||||
var tls = require('tls');
|
||||
var socket = tls.connect(443, 'address.melissadata.net', function() {
|
||||
socket.resume();
|
||||
|
|
Loading…
Reference in New Issue