Skip to content

configure: when enabling QUIC, check that TLS supports QUIC#12683

Closed
bagder wants to merge 2 commits intomasterfrom
bagder/configure-check-openssl-quic
Closed

configure: when enabling QUIC, check that TLS supports QUIC#12683
bagder wants to merge 2 commits intomasterfrom
bagder/configure-check-openssl-quic

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Jan 11, 2024

Most importantly perhaps is when using OpenSSL that the used build/flavor has the QUIC API: the vanilla OpenSSL does not, only BoringSSL, libressl, AWS-LC and quictls do.

Ref: 5d044ad#r136780413

Most importantly perhaps is when using OpenSSL that the used
build/flavor has the QUIC API: the vanilla OpenSSL does not, only
BoringSSL, libressl, AWS-LC and quictls do.

Ref: 5d044ad#r136780413
@bagder bagder added build TLS HTTP/3 h3 or quic related labels Jan 11, 2024
bagder referenced this pull request Jan 11, 2024
- separate ngtcp2 specific parts out
- provide callback during init to allow ngtcp2 to apply its defaults

Closes #12678
@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 11, 2024

I did not make any elaborate checks for GnuTLS and wolfSSL as I figure they are much less likely to be a problem for users since they support QUIC "from scratch".

@icing
Copy link
Copy Markdown
Contributor

icing commented Jan 11, 2024

Nice. One problem remains. vquic-tls.c should guard against !USE_MSH3, because that is a QUIC built that "works" with a plain OpenSSL.

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 11, 2024

Oh right, that complicates matters a little...

@gvanem
Copy link
Copy Markdown
Contributor

gvanem commented Jan 11, 2024

because that is a QUIC built that "works" with a plain OpenSSL.

From Msh3's About: Minimal HTTP/3 library on top of MsQuic.
So not necessarily plain OpenSSL. Ref: https://github.com/microsoft/msquic/blob/main/docs/Platforms.md.

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 11, 2024

They write like this about Linux builds:

Important This configuration relies on a fork of OpenSSL for QUIC/TLS support. It is still currently unknown as to when mainline will support QUIC

It seems they only support vanilla OpenSSL on Windows?

@bagder bagder closed this in b3f02e1 Jan 12, 2024
@bagder bagder deleted the bagder/configure-check-openssl-quic branch January 12, 2024 08:48
@gvanem
Copy link
Copy Markdown
Contributor

gvanem commented Jan 12, 2024

So what about USE_MSH3 on Windows?
Now I need to add CSOURCES := $(filter-out vquic/vquic-tls.c, $(CSOURCES)) to my tweaked Makefile
since the warning/error is still the same:

vquic/vquic-tls.c(219,3): warning C4013: 'SSL_set_quic_use_legacy_codepoint' undefined; assuming extern returning int
  SSL_set_quic_use_legacy_codepoint(ctx->ssl, 0);
  ^

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

That needs a different take than this PR, yes. It probably needs adjustments in the code.

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

We should probably have CI jobs doing HTTTP/3 on Windows too...

@gvanem
Copy link
Copy Markdown
Contributor

gvanem commented Jan 12, 2024

Or should it say:

--- a/lib/vquic/vquic-tls.c 2024-01-11 11:17:26
+++ b/lib/vquic/vquic-tls.c 2024-01-12 10:26:47
@@ -24,7 +24,7 @@

 #include "curl_setup.h"

-#if defined(ENABLE_QUIC) && \
+#if defined(ENABLE_QUIC) && defined(USE_NGTCP2) && defined(USE_NGHTTP3) \
   (defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_WOLFSSL))

 #ifdef USE_OPENSSL

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

Isn't it used for quiche too?

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

So maybe?

#if defined(ENABLE_QUIC) && !defined(USE_MSH3) && \
  (defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_WOLFSSL))

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

or wait, isn't this still needed for msh3 on linux?

@icing
Copy link
Copy Markdown
Contributor

icing commented Jan 12, 2024

We use this code only for ngtcp2 and quiche now. So

#if (defined(USE_NGTCP2) || defined(USE_QUICHE)) && \
  (defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_WOLFSSL))

should do it?

or just

#if (defined(USE_NGTCP2) || defined(USE_QUICHE))

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

right, the latter might be enough

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Jan 12, 2024

If we later need it for msh3 on linux, I figure we could set a define for each specific backend that needs the init instead, like #define VQUIC_TLS_INIT 1 and only check for that.

vszakats added a commit to vszakats/curl that referenced this pull request Dec 31, 2024
Before this patch, detection used a function which wasn't called
from curl since d2c6d8b curl#8968.

Follow-up to b3f02e1 curl#12683
vszakats added a commit to vszakats/curl that referenced this pull request Dec 31, 2024
Before this patch, detection used a function which wasn't called
from curl since d2c6d8b curl#8968.

Follow-up to b3f02e1 curl#12683
vszakats added a commit that referenced this pull request Dec 31, 2024
Before this patch, detection used a function which wasn't called
from curl since d2c6d8b #8968.

Follow-up to b3f02e1 #12683
Closes #15873
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Before this patch, detection used a function which wasn't called
from curl since d2c6d8b curl#8968.

Follow-up to b3f02e1 curl#12683
Closes curl#15873
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build HTTP/3 h3 or quic related TLS

Development

Successfully merging this pull request may close these issues.

3 participants