crypto: add TLS 1.1 and 1.2 to secureProtocol list
authorMatthias Bartelmeß <mba@fourplusone.de>
Mon, 12 Aug 2013 22:21:54 +0000 (00:21 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 13 Aug 2013 09:46:07 +0000 (11:46 +0200)
src/node_crypto.cc

index a2779ed..0239e74 100644 (file)
@@ -254,6 +254,18 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& 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");
     }