mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
tls: workaround handshakedone in renegotiation
`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. Backport-PR-URL: https://github.com/nodejs/node/pull/26270 PR-URL: https://github.com/nodejs/node/pull/25381 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
This commit is contained in:
1 parent
56441a0900
commit
8dd8033519
1 file changed
+4
-1
+4
-1
@@ -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)) {
|
||||
c->established_ = true;
|
||||
Local<Value> callback = object->Get(env->onhandshakedone_string());
|
||||
if (callback->IsFunction()) {
|
||||
|
||||
Reference in new issue
Block a user