diff options
author | Shigeki Ohtsu <ohtsu@ohtsu.org> | 2018-09-12 17:34:24 +0900 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2019-01-22 13:34:06 -0800 |
commit | bbed92ca85bfbd78d2af7af7b5bc56952fe0fa1a (patch) | |
tree | 997cb133631a7409c619338f088b51344d5af4e6 /src/tls_wrap.cc | |
parent | 3f419e897ba3b1a412dd300649282ee14d5df361 (diff) | |
download | android-node-v8-bbed92ca85bfbd78d2af7af7b5bc56952fe0fa1a.tar.gz android-node-v8-bbed92ca85bfbd78d2af7af7b5bc56952fe0fa1a.tar.bz2 android-node-v8-bbed92ca85bfbd78d2af7af7b5bc56952fe0fa1a.zip |
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.
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Diffstat (limited to 'src/tls_wrap.cc')
-rw-r--r-- | src/tls_wrap.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index d9f916f3d1..f55f8ca317 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -222,7 +222,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<Value> callback; c->established_ = true; |