From a51d839a311686d03b30e0e4bf0e3735d0f7415a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 25 Sep 2018 10:37:02 +0200 Subject: [PATCH] crypto: remove unnecessary calls to TLS_method() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23077 Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- src/node_crypto.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 49eabe2ec46704..2eeb0b01916b62 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -407,7 +407,7 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { } else if (strcmp(*sslmethod, "SSLv3_client_method") == 0) { return env->ThrowError("SSLv3 methods disabled"); } else if (strcmp(*sslmethod, "SSLv23_method") == 0) { - method = TLS_method(); + // noop } else if (strcmp(*sslmethod, "SSLv23_server_method") == 0) { method = TLS_server_method(); } else if (strcmp(*sslmethod, "SSLv23_client_method") == 0) { @@ -415,7 +415,6 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { } else if (strcmp(*sslmethod, "TLSv1_method") == 0) { min_version = TLS1_VERSION; max_version = TLS1_VERSION; - method = TLS_method(); } else if (strcmp(*sslmethod, "TLSv1_server_method") == 0) { min_version = TLS1_VERSION; max_version = TLS1_VERSION; @@ -427,7 +426,6 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { } else if (strcmp(*sslmethod, "TLSv1_1_method") == 0) { min_version = TLS1_1_VERSION; max_version = TLS1_1_VERSION; - method = TLS_method(); } else if (strcmp(*sslmethod, "TLSv1_1_server_method") == 0) { min_version = TLS1_1_VERSION; max_version = TLS1_1_VERSION; @@ -439,7 +437,6 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { } else if (strcmp(*sslmethod, "TLSv1_2_method") == 0) { min_version = TLS1_2_VERSION; max_version = TLS1_2_VERSION; - method = TLS_method(); } else if (strcmp(*sslmethod, "TLSv1_2_server_method") == 0) { min_version = TLS1_2_VERSION; max_version = TLS1_2_VERSION;