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

Commit 3139fa2

Browse files
committed
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.
1 parent 3859fbd commit 3139fa2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/node_crypto.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,11 @@ Handle<Value> SecureContext::Init(const Arguments& args) {
337337

338338
int options = 0;
339339

340-
#ifndef OPENSSL_NO_SSL2
341340
if (!SSL2_ENABLE)
342341
options |= SSL_OP_NO_SSLv2;
343-
#endif
344342

345-
#ifndef OPENSSL_NO_SSL3
346343
if (!SSL3_ENABLE)
347344
options |= SSL_OP_NO_SSLv3;
348-
#endif
349345

350346
SSL_CTX_set_options(sc->ctx_, options);
351347

0 commit comments

Comments
 (0)