From: Neil Horman Date: Fri, 21 Nov 2025 15:31:35 +0000 (-0500) Subject: Add SSL_CTX_is_quic API X-Git-Tag: 3.6-PRE-CLANG-FORMAT-WEBKIT~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d010a5b934bf57a7933341ea3bc42aa902996c4b;p=thirdparty%2Fopenssl.git Add SSL_CTX_is_quic API Like SSL_is_quic, it would be helpful to know if SSL_CTX objects create QUIC SSL's or not. Note, this is a public function in the master branch, but is made private for older stable branches, so as not to introduce new public API's there (3.6-3.0) Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/29193) --- diff --git a/include/internal/ssl.h b/include/internal/ssl.h index 689f3484ff7..7b6856cf42e 100644 --- a/include/internal/ssl.h +++ b/include/internal/ssl.h @@ -18,6 +18,13 @@ typedef void (*ossl_msg_cb)(int write_p, int version, int content_type, int ossl_ssl_get_error(const SSL *s, int i, int check_err); +/* + * Test to see if an SSL_CTX is using a QUIC method + * This is public in the master branch + * but made private for current stable branches + */ +int SSL_CTX_is_quic(const SSL_CTX *c); + /* Set if this is the QUIC handshake layer */ # define TLS1_FLAGS_QUIC 0x2000 /* Set if this is our QUIC handshake layer */ diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index fcceecf10c9..6abdfda9677 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1023,6 +1023,11 @@ int SSL_is_quic(const SSL *s) return IS_QUIC(s); } +int SSL_CTX_is_quic(const SSL_CTX *c) +{ + return IS_QUIC_CTX(c); +} + int SSL_up_ref(SSL *s) { int i;