Commit graph

10 commits

Author SHA1 Message Date
Yagiz Nizipli
317d2450f9
src: modernize likely/unlikely hints
PR-URL: https://github.com/nodejs/node/pull/55155
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-09-30 18:04:16 +00:00
James M Snell
cdae315706 quic: start adding in the internal quic js api
While the external API for QUIC is expected to be
the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native
C++ QUIC components.

PR-URL: https://github.com/nodejs/node/pull/53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-09-29 11:41:03 -07:00
James M Snell
285c6a0df3 src: eliminate ManagedEVPPkey
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.

Previously we had:

  KeyObjectHandle ->
      std::shared_ptr<KeyObjectData> ->
          ManagedEVPPkey ->
              EVPKeyPointer

After this change we have:

  KeyObjectHandle ->
      KeyObjectData ->
          EVPKeyPointer

The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.

This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.

This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.

PR-URL: https://github.com/nodejs/node/pull/54751
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2024-09-11 07:40:51 -07:00
James M Snell
06a3a2a1fb quic: rework TLSContext, additional cleanups
PR-URL: https://github.com/nodejs/node/pull/51340
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-04-20 18:10:17 -07:00
James M Snell
3605574b92 quic: various additional cleanups, fixes in Endpoint
PR-URL: https://github.com/nodejs/node/pull/51310
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-01-06 08:51:35 -08:00
James M Snell
0bf154826f quic: update quic impl to use latest ngtcp2/nghttp3
PR-URL: https://github.com/nodejs/node/pull/51291
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2023-12-29 07:33:31 -08:00
James M Snell
c3664227a8 quic: add quic internalBinding, refine Endpoint, add types
PR-URL: https://github.com/nodejs/node/pull/51112
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-12-26 16:27:49 -08:00
James M Snell
6d2811fbf2 quic: add additional implementation
* add QUIC_SESSION and QUIC_STREAM to AsyncWrap
* update definitions in quic/bindingdata.h
* fixup minor discrepancies in cid.h/cid.cc
* add convenience operator in struct Path
* fixup defs.h macro definitions
* fixups in quic/preferredaddress.h/cc
* fixups in src/quic/tokens.h/cc
* fixups in quic/transportparams.h/cc
* fixups in quic/tlscontext.h/cc
* add quic/streams.h/cc placeholder
* add quic session/application implementation

PR-URL: https://github.com/nodejs/node/pull/47927
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-05-27 09:43:34 -07:00
James M Snell
76044c4e2b
quic: add additional QUIC implementation
Adds most of the Endpoint implementation with a few tweaks to
other bits.

PR-URL: https://github.com/nodejs/node/pull/47603
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-04-26 13:27:04 +00:00
James M Snell
1c3d741cb0 quic: add more QUIC implementation
* add TLSContext
* quic: add stat collection utilities
* add Packet
* add NgTcp2CallbackScope/NgHttp3CallbackScope

PR-URL: https://github.com/nodejs/node/pull/47494
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-04-17 17:49:16 -07:00