diff options
author | James M Snell <jasnell@gmail.com> | 2017-02-17 15:00:20 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-02-20 06:59:30 -0800 |
commit | d523eb9c40889d476f919b523dc3c67b245826c8 (patch) | |
tree | 229702a8aa47337aba0593f37ad7996830e1897a /test/parallel/test-tls-dhe.js | |
parent | 051047231ec71307302904b10dd8a80ee3027ae0 (diff) | |
download | node-new-d523eb9c40889d476f919b523dc3c67b245826c8.tar.gz |
tls: use emitWarning() for dhparam < 2048 bits
When a dhparam less than 2048 bits was used, a warning was being
printed directly to console.error using an internalUtil.trace
function that was not used anywhere else. This replaces it with
a proper process warning and removes the internalUtil.trace
function.
PR-URL: https://github.com/nodejs/node/pull/11447
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'test/parallel/test-tls-dhe.js')
-rw-r--r-- | test/parallel/test-tls-dhe.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js index d0c59ac074..b4ca0b46e3 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js @@ -1,3 +1,4 @@ +// Flags: --no-warnings 'use strict'; const common = require('../common'); const assert = require('assert'); @@ -22,6 +23,9 @@ let nsuccess = 0; let ntests = 0; const ciphers = 'DHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; +// Test will emit a warning because the DH parameter size is < 2048 bits +common.expectWarning('SecurityWarning', + 'DH parameter is less than 2048 bits'); function loadDHParam(n) { let path = common.fixturesDir; |