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
path: root/src
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-06-03 21:48:25 +0300
committerMichaël Zasso <targos@protonmail.com>2019-12-09 12:23:03 +0300
commit255cd7e57218bee655eba90085de425a20d892b6 (patch)
tree9002289fdf609d97104410aa5a3adeb7cafca040 /src
parent9428304d4a829ae9f7bb49c21faaed1ea3289c14 (diff)
tls: expose IETF name for current cipher suite
OpenSSL has its own legacy names, but knowing the IETF name is useful when trouble-shooting, or looking for more information on the cipher. PR-URL: https://github.com/nodejs/node/pull/30637 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/env.h1
-rw-r--r--src/node_crypto.cc3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index c25a03ea1e5..b3f1243f775 100644
--- a/src/env.h
+++ b/src/env.h
@@ -351,6 +351,7 @@ constexpr size_t kFsStatsBufferLength =
V(sni_context_string, "sni_context") \
V(source_string, "source") \
V(stack_string, "stack") \
+ V(standard_name_string, "standardName") \
V(start_time_string, "startTime") \
V(status_string, "status") \
V(stdio_string, "stdio") \
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 2d965bcbff5..3f771793e2c 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -2685,6 +2685,9 @@ void SSLWrap<Base>::GetCipher(const FunctionCallbackInfo<Value>& args) {
const char* cipher_name = SSL_CIPHER_get_name(c);
info->Set(context, env->name_string(),
OneByteString(args.GetIsolate(), cipher_name)).Check();
+ const char* cipher_standard_name = SSL_CIPHER_standard_name(c);
+ info->Set(context, env->standard_name_string(),
+ OneByteString(args.GetIsolate(), cipher_standard_name)).Check();
const char* cipher_version = SSL_CIPHER_get_version(c);
info->Set(context, env->version_string(),
OneByteString(args.GetIsolate(), cipher_version)).Check();