Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
crypto: extra caution in setting ssl options
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
orangemocha committed Oct 16, 2014
1 parent 3859fbd commit 3139fa2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3139fa2

Please sign in to comment.