diff options
author | James M Snell <jasnell@gmail.com> | 2016-05-02 20:27:12 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-05-17 21:05:18 +0300 |
commit | dcccbfdc799d174901c29d82874457367231fec5 (patch) | |
tree | bb1a45d053b169af0b1662000d57e034e4422996 /lib/tls.js | |
parent | f856234ffaa10441545c3b6ce420b247a17c06cf (diff) |
src: refactor require('constants')
The require('constants') module is currently undocumented and mashes
together unrelated constants. This refactors the require('constants')
in favor of distinct os.constants, fs.constants, and crypto.constants
that are specific to the modules for which they are relevant. The
next step is to document those within the specific modules.
PR-URL: https://github.com/nodejs/node/pull/6534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Diffstat (limited to 'lib/tls.js')
-rw-r--r-- | lib/tls.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tls.js b/lib/tls.js index 1d119483a24..80ea0d76977 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -6,7 +6,6 @@ const net = require('net'); const url = require('url'); const binding = process.binding('crypto'); const Buffer = require('buffer').Buffer; -const constants = require('constants'); // Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations // every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more @@ -17,7 +16,8 @@ exports.CLIENT_RENEG_WINDOW = 600; exports.SLAB_BUFFER_SIZE = 10 * 1024 * 1024; -exports.DEFAULT_CIPHERS = constants.defaultCipherList; +exports.DEFAULT_CIPHERS = + process.binding('constants').crypto.defaultCipherList; exports.DEFAULT_ECDH_CURVE = 'prime256v1'; |