Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2018-05-06 07:52:34 +0300
committerSam Roberts <vieuxtech@gmail.com>2018-11-22 20:14:58 +0300
commitf512f5ea138fe86e47c0179d5733044daf6f4fe6 (patch)
tree944745196104118f057d4e0834b62422cf72480f /src/node_constants.cc
parent160ac0f32513337214dc5a4cdb1fa8de3c2ed14c (diff)
tls: add min/max protocol version options
The existing secureProtocol option only allows setting the allowed protocol to a specific version, or setting it to "all supported versions". It also used obscure strings based on OpenSSL C API functions. Directly setting the min or max is easier to use and explain. PR-URL: https://github.com/nodejs/node/pull/24405 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'src/node_constants.cc')
-rw-r--r--src/node_constants.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc
index 3b028b52aa7..7530d6d0a34 100644
--- a/src/node_constants.cc
+++ b/src/node_constants.cc
@@ -1237,6 +1237,10 @@ void DefineCryptoConstants(Local<Object> target) {
NODE_DEFINE_STRING_CONSTANT(target,
"defaultCipherList",
per_process_opts->tls_cipher_list.c_str());
+
+ NODE_DEFINE_CONSTANT(target, TLS1_VERSION);
+ NODE_DEFINE_CONSTANT(target, TLS1_1_VERSION);
+ NODE_DEFINE_CONSTANT(target, TLS1_2_VERSION);
#endif
NODE_DEFINE_CONSTANT(target, INT_MAX);
}