From 18e4689217773beba27293b495a3815e28b6f589 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() --- 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 e78ac9e47a12f0..153bfd2d018466 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;