From 3139fa20d78260399a1e5b577690007a8a451c73 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Thu, 16 Oct 2014 18:45:47 +0200 Subject: [PATCH] crypto: extra caution in setting ssl options Always set ssl2/ssl3 disabled based on whether they are enabled in Node. In some corner-case scenario, node with OPENSSL_NO_SSL3 defined could be linked to openssl that has SSL3 enabled. --- src/node_crypto.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e56544d1ca8c..fbcdf8651290 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -337,15 +337,11 @@ Handle SecureContext::Init(const Arguments& args) { int options = 0; -#ifndef OPENSSL_NO_SSL2 if (!SSL2_ENABLE) options |= SSL_OP_NO_SSLv2; -#endif -#ifndef OPENSSL_NO_SSL3 if (!SSL3_ENABLE) options |= SSL_OP_NO_SSLv3; -#endif SSL_CTX_set_options(sc->ctx_, options);