Skip to content

ngtcp2+openssl support #17027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

ngtcp2+openssl support #17027

wants to merge 2 commits into from

Conversation

icing
Copy link
Contributor

@icing icing commented Apr 11, 2025

With the new addition of QUIC support and the support in ngtcp2 main branch, make the necessary adjustments in curl to support this combination.

  • add support in configure.ac to detect the feature OPENSSL_QUIC_API2 in openssl
  • initialise ngtcp2 properly in this combination
  • add a Curl_vquic_init() for global initialisation that ngtcp2 likes for performance reasons

Missing:

@bagder bagder added build HTTP/3 h3 or quic related labels Apr 11, 2025
@icing
Copy link
Contributor Author

icing commented Apr 11, 2025

/cc @tatsuhiro-t who did the heavy lifting in ngtcp2 🎉

@tatsuhiro-t
Copy link
Contributor

Make sure that curl does either:

  • Keep ngtcp2_conn alive until SSL object is freed by SSL_free; or
  • Call SSL_set_app_data(ssl, NULL) before calling SSL_free

@icing
Copy link
Contributor Author

icing commented Apr 11, 2025

Make sure that curl does either:

  • Keep ngtcp2_conn alive until SSL object is freed by SSL_free; or
  • Call SSL_set_app_data(ssl, NULL) before calling SSL_free

Happily, we already did the SSL frees before the nghttp3_conn_del() and ngtcp2_conn_del() calls.

@curl curl deleted a comment from testclutch Apr 11, 2025
@vszakats
Copy link
Member

vszakats commented Apr 11, 2025

CMake support attempt here: #17018 (passes CI, but not tested with an actual ngtcp2 + openssl build)

@icing icing force-pushed the ossl-quic2 branch 2 times, most recently from 673a822 to 66dd9b2 Compare April 16, 2025 13:18
@github-actions github-actions bot added the CI Continuous Integration label Apr 16, 2025
With the new addition of QUIC support and the support in ngtcp2 main branch, make the necessary adjustments in curl to support this combination.

- add support in configure.ac to detect the feature OPENSSL_QUIC_API2 in openssl
- initialise ngtcp2 properly in this combination
- add a Curl_vquic_init() for global initialisation that ngtcp2 likes for performance reasons
- add documentation on how to build in docs/HTTP3.md
- add CI testing in http3-linux.yml
@icing icing marked this pull request as ready for review April 16, 2025 14:43
@icing icing requested review from vszakats and bagder April 16, 2025 14:43
vszakats added a commit that referenced this pull request Apr 16, 2025
```
curl 8.13.1-DEV (Darwin) libcurl/8.13.1-DEV OpenSSL/3.5.0 [...] ngtcp2/1.12.90 nghttp3/1.9.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd
```

Ref: #17027
Closes #17018
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You rock! 🪨

@bagder bagder closed this in 5eefdd7 Apr 16, 2025
vszakats added a commit that referenced this pull request Apr 24, 2025
- update text on dependency feature detection variables, and move it
  to its own section in `docs/INSTALL-CMAKE.md`.
  Ref: #17032 (Discussion)

- tidy up descriptions/comments, alpha-sort.

- move comment to its own section in `docs/INSTALL-CMAKE.md`.

- split `HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT` to distinct names for
  each TLS backend API. To make the names more stable and to sync them
  with autotools.
  Follow-up to 07cc50f #17018
  Follow-up to 342a654 #15873

- drop redundant condition while detecting QUICTLS API.
  Follow-up to 07cc50f #17018

- add config-comparison exception for `HAVE_SSL_SET_QUIC_TLS_CBS`.
  Follow-up to 5eefdd7 #17027

- detect `wolfSSL_get_peer_certificate` like autotools does.

- detect `wolfSSL_UseALPN` like autotools does.

Closes #17082
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
```
curl 8.13.1-DEV (Darwin) libcurl/8.13.1-DEV OpenSSL/3.5.0 [...] ngtcp2/1.12.90 nghttp3/1.9.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd
```

Ref: curl#17027
Closes curl#17018
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
With the new addition of OpenSSL QUIC API support and the support in
ngtcp2 main branch, make the necessary adjustments in curl to support
this combination.

- add support in configure.ac to detect the feature OPENSSL_QUIC_API2 in
  openssl
- initialise ngtcp2 properly in this combination
- add a Curl_vquic_init() for global initialisation that ngtcp2 likes
  for performance reasons
- add documentation on how to build in docs/HTTP3.md
- add CI testing in http3-linux.yml

Assisted-by: Viktor Szakats
Closes curl#17027
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
- update text on dependency feature detection variables, and move it
  to its own section in `docs/INSTALL-CMAKE.md`.
  Ref: curl#17032 (Discussion)

- tidy up descriptions/comments, alpha-sort.

- move comment to its own section in `docs/INSTALL-CMAKE.md`.

- split `HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT` to distinct names for
  each TLS backend API. To make the names more stable and to sync them
  with autotools.
  Follow-up to 07cc50f curl#17018
  Follow-up to 342a654 curl#15873

- drop redundant condition while detecting QUICTLS API.
  Follow-up to 07cc50f curl#17018

- add config-comparison exception for `HAVE_SSL_SET_QUIC_TLS_CBS`.
  Follow-up to 5eefdd7 curl#17027

- detect `wolfSSL_get_peer_certificate` like autotools does.

- detect `wolfSSL_UseALPN` like autotools does.

Closes curl#17082
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
```
curl 8.13.1-DEV (Darwin) libcurl/8.13.1-DEV OpenSSL/3.5.0 [...] ngtcp2/1.12.90 nghttp3/1.9.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zstd
```

Ref: curl#17027
Closes curl#17018
nbaws pushed a commit to nbaws/curl that referenced this pull request Apr 26, 2025
With the new addition of OpenSSL QUIC API support and the support in
ngtcp2 main branch, make the necessary adjustments in curl to support
this combination.

- add support in configure.ac to detect the feature OPENSSL_QUIC_API2 in
  openssl
- initialise ngtcp2 properly in this combination
- add a Curl_vquic_init() for global initialisation that ngtcp2 likes
  for performance reasons
- add documentation on how to build in docs/HTTP3.md
- add CI testing in http3-linux.yml

Assisted-by: Viktor Szakats
Closes curl#17027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration HTTP/3 h3 or quic related
Development

Successfully merging this pull request may close these issues.

4 participants