summaryrefslogtreecommitdiff
path: root/lib/tls.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/tls.js b/lib/tls.js
index 645c3e9269..9d2b9add66 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -54,15 +54,25 @@ exports.DEFAULT_CIPHERS =
exports.DEFAULT_ECDH_CURVE = 'auto';
-exports.DEFAULT_MAX_VERSION = 'TLSv1.2';
+exports.DEFAULT_MAX_VERSION = 'TLSv1.3';
-if (getOptionValue('--tls-v1.0'))
+if (getOptionValue('--tls-min-v1.0'))
exports.DEFAULT_MIN_VERSION = 'TLSv1';
-else if (getOptionValue('--tls-v1.1'))
+else if (getOptionValue('--tls-min-v1.1'))
exports.DEFAULT_MIN_VERSION = 'TLSv1.1';
+else if (getOptionValue('--tls-min-v1.3'))
+ exports.DEFAULT_MIN_VERSION = 'TLSv1.3';
else
exports.DEFAULT_MIN_VERSION = 'TLSv1.2';
+if (getOptionValue('--tls-max-v1.3'))
+ exports.DEFAULT_MAX_VERSION = 'TLSv1.3';
+else if (getOptionValue('--tls-max-v1.2'))
+ exports.DEFAULT_MAX_VERSION = 'TLSv1.2';
+else
+ exports.DEFAULT_MAX_VERSION = 'TLSv1.3'; // Will depend on node version.
+
+
exports.getCiphers = internalUtil.cachedResult(
() => internalUtil.filterDuplicateStrings(binding.getSSLCiphers(), true)
);