From: jsing Date: Sun, 11 Sep 2022 18:13:30 +0000 (+0000) Subject: Enforce the minimum TLS version requirement for QUIC. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0093eb618fddf16c400b161b93fdb1b65caf60d5;p=openbsd Enforce the minimum TLS version requirement for QUIC. ok tb@ --- diff --git a/lib/libssl/ssl_versions.c b/lib/libssl/ssl_versions.c index 06e26b80591..4a58f14ccdb 100644 --- a/lib/libssl/ssl_versions.c +++ b/lib/libssl/ssl_versions.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_versions.c,v 1.23 2022/06/30 11:17:50 tb Exp $ */ +/* $OpenBSD: ssl_versions.c,v 1.24 2022/09/11 18:13:30 jsing Exp $ */ /* * Copyright (c) 2016, 2017 Joel Sing * @@ -177,6 +177,14 @@ ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver) s->internal->min_tls_version, s->internal->max_tls_version)) return 0; + /* QUIC requires a minimum of TLSv1.3. */ + if (SSL_is_quic(s)) { + if (max_version < TLS1_3_VERSION) + return 0; + if (min_version < TLS1_3_VERSION) + min_version = TLS1_3_VERSION; + } + if (min_ver != NULL) *min_ver = min_version; if (max_ver != NULL)