]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add SSL_CTX_is_quic API
authorNeil Horman <nhorman@openssl.org>
Fri, 21 Nov 2025 15:31:35 +0000 (10:31 -0500)
committerNeil Horman <nhorman@openssl.org>
Tue, 25 Nov 2025 10:32:46 +0000 (05:32 -0500)
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 <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29193)

include/internal/ssl.h
ssl/ssl_lib.c

index 689f3484ff7b8b357a273e93dcc6f65e6ebc8da9..7b6856cf42e6ed221091855cb776bae2aab7d9f3 100644 (file)
@@ -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 */
index fcceecf10c9bd823a0884abd4ac56ba74ceb4996..6abdfda96774e14d39d1f6ce2dc3eee75e63aa76 100644 (file)
@@ -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;