crypto: remove unnecessary calls to TLS_method()
PR-URL: https://github.com/nodejs/node/pull/23077 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
406e3ad212
commit
8316c6f047
@ -407,7 +407,7 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& 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<Value>& 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<Value>& 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<Value>& 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user