Skip to content

Commit 54b4beb

Browse files
committed
tls: support TLS_client_method, TLS_server_method
Add the two TLS protocol method functions which were missing. They seem useful, and are already documented as being supported (indirectly, our docs just point to OpenSSL's docs). PR-URL: #24386 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent eb42c1e commit 54b4beb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/node_crypto.cc

+8
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,14 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
431431
} else if (strcmp(*sslmethod, "TLS_method") == 0) {
432432
min_version = 0;
433433
max_version = 0;
434+
} else if (strcmp(*sslmethod, "TLS_server_method") == 0) {
435+
min_version = 0;
436+
max_version = 0;
437+
method = TLS_server_method();
438+
} else if (strcmp(*sslmethod, "TLS_client_method") == 0) {
439+
min_version = 0;
440+
max_version = 0;
441+
method = TLS_client_method();
434442
} else if (strcmp(*sslmethod, "TLSv1_method") == 0) {
435443
min_version = TLS1_VERSION;
436444
max_version = TLS1_VERSION;

0 commit comments

Comments
 (0)