Skip to content

Commit

Permalink
quic: refactor lifecycle and allow for early data
Browse files Browse the repository at this point in the history
Refactor core.js and various lifecycle events for
consistency and clarity. Start support for early
data (ORTT and 0.5RTT streams). Improve handling
of early transport params and session ticket.
  • Loading branch information
jasnell committed Feb 22, 2020
1 parent 368e339 commit b8ef17f
Show file tree
Hide file tree
Showing 19 changed files with 968 additions and 444 deletions.
17 changes: 15 additions & 2 deletions doc/api/quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,18 @@ added: REPLACEME

A `BigInt` representing the length of time the `QuicSession` was active.

#### quicsession.earlyData
<!-- YAML
added: REPLACEME
-->

* Type: {boolean}

On server `QuicSession` instances, set to `true` on completion of the TLS
handshake if early data is enabled. On client `QuicSession` instances,
set to true on handshake completion if early data is enabled *and* was
accepted by the server.

#### quicsession.getCertificate()
<!-- YAML
added: REPLACEME
Expand Down Expand Up @@ -1153,9 +1165,8 @@ added: REPLACEME

The `'sessionTicket'` event is emitted when a new TLS session ticket has been
generated for the current `QuicClientSession`. The callback is invoked with
three arguments:
two arguments:

* `sessionID` {Buffer} The serialized session ticket identifier.
* `sessionTicket` {Buffer} The serialized session ticket.
* `remoteTransportParams` {Buffer} The serialized remote transport parameters
provided by the QUIC server.
Expand Down Expand Up @@ -1656,6 +1667,8 @@ added: REPLACEME
error will be thrown. It is strongly recommended to use 2048 bits or larger
for stronger security. If omitted or invalid, the parameters are silently
discarded and DHE ciphers will not be available.
* `earlyData` {boolean} Set to `false` to disable 0RTT early data.
Default: `true`.
* `ecdhCurve` {string} A string describing a named curve or a colon separated
list of curve NIDs or names, for example `P-521:P-384:P-256`, to use for
ECDH key agreement. Set to `auto` to select the
Expand Down
Loading

0 comments on commit b8ef17f

Please sign in to comment.