diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index da18522d37b397..ff2f53f15c4ab5 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -210,10 +210,9 @@ void TLSWrap::SSLInfoCallback(const SSL* ssl_, int where, int ret) { if (!(where & (SSL_CB_HANDSHAKE_START | SSL_CB_HANDSHAKE_DONE))) return; - // Be compatible with older versions of OpenSSL. SSL_get_app_data() wants - // a non-const SSL* in OpenSSL <= 0.9.7e. + // SSL_renegotiate_pending() should take `const SSL*`, but it does not. SSL* ssl = const_cast(ssl_); - TLSWrap* c = static_cast(SSL_get_app_data(ssl)); + TLSWrap* c = static_cast(SSL_get_app_data(ssl_)); Environment* env = c->env(); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context());