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)
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
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 */
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);