From 4ac6912a778be5876cf1759bb46d7e03f82784d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Tue, 13 Aug 2013 00:21:54 +0200 Subject: [PATCH] crypto: add TLS 1.1 and 1.2 to secureProtocol list --- src/node_crypto.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index a2779ed4e77..0239e7454c4 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -254,6 +254,18 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { method = TLSv1_server_method(); } else if (strcmp(*sslmethod, "TLSv1_client_method") == 0) { method = TLSv1_client_method(); + } else if (strcmp(*sslmethod, "TLSv1_1_method") == 0) { + method = TLSv1_1_method(); + } else if (strcmp(*sslmethod, "TLSv1_1_server_method") == 0) { + method = TLSv1_1_server_method(); + } else if (strcmp(*sslmethod, "TLSv1_1_client_method") == 0) { + method = TLSv1_1_client_method(); + } else if (strcmp(*sslmethod, "TLSv1_2_method") == 0) { + method = TLSv1_2_method(); + } else if (strcmp(*sslmethod, "TLSv1_2_server_method") == 0) { + method = TLSv1_2_server_method(); + } else if (strcmp(*sslmethod, "TLSv1_2_client_method") == 0) { + method = TLSv1_2_client_method(); } else { return ThrowError("Unknown method"); }