diff options
author | Matt Caswell <matt@openssl.org> | 2023-03-24 12:02:37 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-05-08 10:13:39 +0100 |
commit | d98f4212b778e3b6b7c15b9fce0a3531f59777a2 (patch) | |
tree | 33e35db2a5d2f19d13cc3ace4baf7cd5ab2eedb1 /apps | |
parent | 90ae2c13c1cc318568c65d6ad18409741cc54eae (diff) |
Don't attempt a QUIC connection without specifying ALPN
ALPN is required for a successful QUIC connection, so do not allow the
-quic option for s_client without -alpn
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20580)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index f0ea14a284..2301c70449 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2166,6 +2166,10 @@ int s_client_main(int argc, char **argv) BIO_printf(bio_err, "%s: QUIC does not support the -tfo option\n", prog); goto end; } + if (isquic && alpn_in == NULL) { + BIO_printf(bio_err, "%s: QUIC requires ALPN to be specified (e.g. \"h3\" for HTTP/3) via the -alpn option\n", prog); + goto end; + } #endif if (tfo) |