Skip to content

Commit

Permalink
test: add missing crypto checks
Browse files Browse the repository at this point in the history
Add a check for crypto before using it, similar to how
other tests work.

PR-URL: #2129
Reviewed-By: Shigeki Ohtsu <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
  • Loading branch information
jbergstroem committed Jul 8, 2015
1 parent ee3ce2e commit 2ba1740
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/internet/test-tls-connnect-cnnic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 7 additions & 0 deletions test/internet/test-tls-connnect-melissadata.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down

0 comments on commit 2ba1740

Please sign in to comment.