-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Fixes: nodejs/Release#80 PR-URL: #5529 Reviewed-By: Rod Vagg <[email protected]>
- Loading branch information
1 parent
e483f3f
commit f8cb0dc
Showing
9 changed files
with
51 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
|
||
namespace node { | ||
|
||
extern bool SSL2_ENABLE; | ||
extern bool SSL3_ENABLE; | ||
|
||
namespace crypto { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
var common = require('../common'); | ||
var assert = require('assert'); | ||
var spawn = require('child_process').spawn; | ||
|
||
var stdout = ''; | ||
var stderr = ''; | ||
var proc = spawn(process.execPath, ['--enable-ssl2', '-e', '0']); | ||
proc.stdout.setEncoding('utf8'); | ||
proc.stderr.setEncoding('utf8'); | ||
proc.stdout.on('data', function(data) { stdout += data; }); | ||
proc.stderr.on('data', function(data) { stderr += data; }); | ||
proc.on('exit', common.mustCall(function(exitCode, signalCode) { | ||
assert.strictEqual(exitCode, 12); | ||
assert.strictEqual(signalCode, null); | ||
})); | ||
process.on('exit', function() { | ||
assert.strictEqual(stdout, ''); | ||
assert(/Error: --enable-ssl2 is no longer supported/.test(stderr)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'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/); | ||
}); |