From b3623ae1902be79304f2c3a3fdf1a67fe925689c Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 23 Jul 2020 12:11:12 -0700 Subject: [PATCH] quic: refactor ocsp to use async function rather than event/callback --- doc/api/quic.md | 91 ++++++++------ lib/internal/quic/core.js | 117 ++++++++---------- lib/internal/quic/util.js | 33 +++-- src/quic/node_quic_session.cc | 10 +- src/quic/node_quic_session.h | 2 +- test/parallel/test-quic-client-server.js | 69 ++++++----- .../test-quic-errors-quicsocket-connect.js | 4 +- 7 files changed, 177 insertions(+), 149 deletions(-) diff --git a/doc/api/quic.md b/doc/api/quic.md index 64b5f7ff087437..9a2d94080cde71 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1188,23 +1188,6 @@ added: REPLACEME The `QuicClientSession` class implements the client side of a QUIC connection. Instances are created using the `quicsocket.connect()` method. -#### Event: `'OCSPResponse'` - - -Emitted when the `QuicClientSession` receives a requested OCSP certificate -status response from the QUIC server peer. - -The callback is invoked with a single argument: - -* `response` {Buffer} - -Node.js does not perform any automatic validation or processing of the -response. - -The `'OCSPResponse'` event will not be emitted more than once. - #### Event: `'sessionTicket'` - -Emitted when the `QuicServerSession` has received a OCSP certificate status -request as part of the TLS handshake. - -The callback is invoked with three arguments: - -* `servername` {string} -* `context` {tls.SecureContext} -* `callback` {Function} - -The callback *must* be invoked in order for the TLS handshake to continue. - -The `'OCSPRequest'` event will not be emitted more than once. - #### `quicserversession.addContext(servername\[, context\])`