diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 48c198f315d440..fcce8aad104340 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -221,7 +221,10 @@ void TLSWrap::SSLInfoCallback(const SSL* ssl_, int where, int ret) { } } - if (where & SSL_CB_HANDSHAKE_DONE) { + // SSL_CB_HANDSHAKE_START and SSL_CB_HANDSHAKE_DONE are called + // sending HelloRequest in OpenSSL-1.1.1. + // We need to check whether this is in a renegotiation state or not. + if (where & SSL_CB_HANDSHAKE_DONE && !SSL_renegotiate_pending(ssl)) { Local callback; c->established_ = true;