QUIC: Add API for SSL_VALUE_EVENT_HANDLING_MODE
authorHugo Landau <hlandau@openssl.org>
Fri, 9 Feb 2024 12:52:33 +0000 (12:52 +0000)
committerTomas Mraz <tomas@openssl.org>
Mon, 19 Feb 2024 09:15:46 +0000 (10:15 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23535)

include/openssl/ssl.h.in
util/other.syms

index 8e98e6acf29fd0a61e2f650daf1c55cad5e9749f..4c5477de98d209c7e71126f4c20c318378309540 100644 (file)
@@ -2377,6 +2377,11 @@ __owur int SSL_get_conn_close_info(SSL *ssl,
 # define SSL_VALUE_QUIC_STREAM_UNI_LOCAL_AVAIL      3
 # define SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL     4
 # define SSL_VALUE_QUIC_IDLE_TIMEOUT                5
+# define SSL_VALUE_EVENT_HANDLING_MODE              6
+
+# define SSL_VALUE_EVENT_HANDLING_MODE_INHERIT      0
+# define SSL_VALUE_EVENT_HANDLING_MODE_IMPLICIT     1
+# define SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT     2
 
 int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t *v);
 int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t v);
@@ -2407,6 +2412,13 @@ int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t v);
     SSL_get_generic_value_uint((ssl), SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL, \
                                (value))
 
+# define SSL_get_event_handling_mode(ssl, value) \
+    SSL_get_generic_value_uint((ssl), SSL_VALUE_EVENT_HANDLING_MODE, \
+                               (value))
+# define SSL_set_event_handling_mode(ssl, value) \
+    SSL_set_generic_value_uint((ssl), SSL_VALUE_EVENT_HANDLING_MODE, \
+                               (value))
+
 # define SSL_POLL_EVENT_NONE        0
 
 # define SSL_POLL_EVENT_F           (1U <<  0) /* F   (Failure) */
index 3148866fb12ea9b8bf32a1001c76d3fae35d7493..b45ba45bb587198fc7120c25d84ddb1a1c682dc2 100644 (file)
@@ -664,6 +664,8 @@ SSL_get_quic_stream_bidi_local_avail    define
 SSL_get_quic_stream_bidi_remote_avail   define
 SSL_get_quic_stream_uni_local_avail     define
 SSL_get_quic_stream_uni_remote_avail    define
+SSL_get_event_handling_mode             define
+SSL_set_event_handling_mode             define
 SSL_CONN_CLOSE_FLAG_LOCAL               define
 SSL_CONN_CLOSE_FLAG_TRANSPORT           define
 SSLv23_client_method                    define
@@ -725,6 +727,10 @@ SSL_VALUE_QUIC_STREAM_BIDI_LOCAL_AVAIL  define
 SSL_VALUE_QUIC_STREAM_BIDI_REMOTE_AVAIL define
 SSL_VALUE_QUIC_STREAM_UNI_LOCAL_AVAIL   define
 SSL_VALUE_QUIC_STREAM_UNI_REMOTE_AVAIL  define
+SSL_VALUE_EVENT_HANDLING_MODE           define
+SSL_VALUE_EVENT_HANDLING_MODE_INHERIT   define
+SSL_VALUE_EVENT_HANDLING_MODE_IMPLICIT  define
+SSL_VALUE_EVENT_HANDLING_MODE_EXPLICIT  define
 TLS_DEFAULT_CIPHERSUITES                define deprecated 3.0.0
 X509_CRL_http_nbio                      define deprecated 3.0.0
 X509_http_nbio                          define deprecated 3.0.0