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.
pull/23395/head
Alexis Campailla 2014-10-16 18:45:47 +02:00
parent 3859fbdb7d
commit 3139fa20d7
1 changed files with 0 additions and 4 deletions

View File

@ -337,15 +337,11 @@ Handle<Value> 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);