If SSL_do_handshake() is called before SSL_provide_quic_data() has been
called, the QUIC read buffer will not have been initialised. In this case
we want to return TLS13_IO_WANT_POLLIN so that the QUIC stack will provide
handshake data.
-/* $OpenBSD: tls13_quic.c,v 1.4 2022/08/21 19:39:44 jsing Exp $ */
+/* $OpenBSD: tls13_quic.c,v 1.5 2022/08/27 09:12:55 jsing Exp $ */
/*
* Copyright (c) 2022 Joel Sing <jsing@openbsd.org>
*
{
struct tls13_ctx *ctx = arg;
+ if (ctx->hs->tls13.quic_read_buffer == NULL)
+ return TLS13_IO_WANT_POLLIN;
+
return tls_buffer_read(ctx->hs->tls13.quic_read_buffer, buf, n);
}