Skip to content

Commit bc35f30

Browse files
committed
fix: enable auto cert chaining to match OpenSSL behaviour
1 parent 8d7aa21 commit bc35f30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/node_crypto.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,11 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
461461
SSL_CTX_set_options(sc->ctx_.get(), SSL_OP_NO_SSLv2);
462462
SSL_CTX_set_options(sc->ctx_.get(), SSL_OP_NO_SSLv3);
463463

464+
// Enable automatic cert chaining. This is enabled by default in OpenSSL, but
465+
// disabled by default in BoringSSL. Enable it explicitly to make the
466+
// behavior match when Node is built with BoringSSL.
467+
SSL_CTX_clear_mode(sc->ctx_.get(), SSL_MODE_NO_AUTO_CHAIN);
468+
464469
// SSL session cache configuration
465470
SSL_CTX_set_session_cache_mode(sc->ctx_.get(),
466471
SSL_SESS_CACHE_SERVER |

0 commit comments

Comments
 (0)