mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
Remove support for SSLv2 because of DROWN (CVE-2016-0800). Use of the `--enable-ssl2` flag is now an error; node will print an error message and exit. PR-URL: https://github.com/nodejs/node/pull/5536 Reviewed-By: Rod Vagg <rod@vagg.org>
20 lines
436 B
JavaScript
20 lines
436 B
JavaScript
'use strict';
|
|
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
try {
|
|
var crypto = require('crypto');
|
|
} catch (e) {
|
|
console.log('1..0 # Skipped: missing crypto');
|
|
return;
|
|
}
|
|
|
|
var methods = ['SSLv2_method', 'SSLv2_client_method', 'SSLv2_server_method'];
|
|
|
|
methods.forEach(function(method) {
|
|
assert.throws(function() {
|
|
crypto.createCredentials({ secureProtocol: method });
|
|
}, /SSLv2 methods disabled/);
|
|
});
|