Skip to content

Commit 4ac6912

Browse files
fourplusonebnoordhuis
authored andcommitted
crypto: add TLS 1.1 and 1.2 to secureProtocol list
1 parent d4ad5d1 commit 4ac6912

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/node_crypto.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,18 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
254254
method = TLSv1_server_method();
255255
} else if (strcmp(*sslmethod, "TLSv1_client_method") == 0) {
256256
method = TLSv1_client_method();
257+
} else if (strcmp(*sslmethod, "TLSv1_1_method") == 0) {
258+
method = TLSv1_1_method();
259+
} else if (strcmp(*sslmethod, "TLSv1_1_server_method") == 0) {
260+
method = TLSv1_1_server_method();
261+
} else if (strcmp(*sslmethod, "TLSv1_1_client_method") == 0) {
262+
method = TLSv1_1_client_method();
263+
} else if (strcmp(*sslmethod, "TLSv1_2_method") == 0) {
264+
method = TLSv1_2_method();
265+
} else if (strcmp(*sslmethod, "TLSv1_2_server_method") == 0) {
266+
method = TLSv1_2_server_method();
267+
} else if (strcmp(*sslmethod, "TLSv1_2_client_method") == 0) {
268+
method = TLSv1_2_client_method();
257269
} else {
258270
return ThrowError("Unknown method");
259271
}

0 commit comments

Comments
 (0)