]> git.kaiwu.me - nginx.git/commitdiff
Sending HANDSHAKE_DONE just once with BoringSSL.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 1 Apr 2020 10:27:42 +0000 (13:27 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 1 Apr 2020 10:27:42 +0000 (13:27 +0300)
If early data is accepted, SSL_do_handshake() completes as soon as ClientHello
is processed.  SSL_in_init() will report the handshake is still in progress.

src/event/ngx_event_quic.c

index 8c577514e928978db7c938e238c0a616634e1f03..be86cf3bcd08a27cf3098d63705b9f5bffe22ca8 100644 (file)
@@ -1060,7 +1060,7 @@ ngx_quic_handle_crypto_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
             return NGX_ERROR;
         }
 
-    } else if (n == 1) {
+    } else if (n == 1 && !SSL_in_init(ssl_conn)) {
         c->quic->state = NGX_QUIC_ST_APPLICATION;
 
         ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,