QUIC SSL: HelloRetryRequest
authorHugo Landau <hlandau@openssl.org>
Mon, 16 Jan 2023 15:28:40 +0000 (15:28 +0000)
committerPauli <pauli@openssl.org>
Tue, 4 Jul 2023 23:02:26 +0000 (09:02 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20061)

doc/man3/DTLSv1_listen.pod
ssl/ssl_lib.c
test/quicapitest.c

index b16a82de9a8e9eaa4881699609375fd26fe311a8..ecf11b8915ba796dce3d363779fa1d7f788bb204 100644 (file)
@@ -103,6 +103,8 @@ TLSv1.3 is used.
 Both SSL_stateless() and DTLSv1_listen() will clear the error queue when they
 start.
 
+SSL_stateless() cannot be used with QUIC SSL objects.
+
 =head1 RETURN VALUES
 
 For SSL_stateless() a return value of 1 indicates success and the B<ssl> object
index 036cc83ca0608509414d34652efe7afe94ebcbdf..97a95ce4b99b46245bdc387bb67184608ba025e9 100644 (file)
@@ -6972,8 +6972,7 @@ int SSL_stateless(SSL *s)
     int ret;
     SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
 
-    /* TODO(QUIC): This will need further work. */
-    if (sc == NULL)
+    if (sc == NULL || IS_QUIC_SSL(s))
         return 0;
 
     /* Ensure there is no state left over from a previous invocation */
index d85dbcff6043c019030c926343f2a77b65357525..1205e968da6d315c322dd7faa3e1aa830bb3de51 100644 (file)
@@ -490,10 +490,14 @@ static int test_quic_forbidden_options(void)
         goto err;
 
     /* Buffer Management */
-    if (!TEST_true(SSL_allocate_buffers(ssl))
+    if (!TEST_true(SSL_alloc_buffers(ssl))
         || !TEST_false(SSL_free_buffers(ssl)))
         goto err;
 
+    /* HRR */
+    if  (!TEST_false(SSL_stateless(ssl)))
+        goto err;
+
     testresult = 1;
 err:
     SSL_free(ssl);