From 255cd7e57218bee655eba90085de425a20d892b6 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 3 Jun 2019 11:48:25 -0700 Subject: tls: expose IETF name for current cipher suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Tobias Nießen Reviewed-By: David Carlier Reviewed-By: Yorkie Liu Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- src/env.h | 1 + src/node_crypto.cc | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src') 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::GetCipher(const FunctionCallbackInfo& 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(); -- cgit v1.2.3