diff options
author | jsing <> | 2022-08-27 09:12:55 +0000 |
---|---|---|
committer | jsing <> | 2022-08-27 09:12:55 +0000 |
commit | dfcfc35b3e4c9296d1b12a9a1a7f7a8dc44a91c2 (patch) | |
tree | fbe3ee91018c26f4d13820567a65a7ae3d6e6f51 /src | |
parent | 2b58d3e3f3e02023efcf3593785dc098eddb50fd (diff) | |
download | openbsd-dfcfc35b3e4c9296d1b12a9a1a7f7a8dc44a91c2.tar.gz openbsd-dfcfc35b3e4c9296d1b12a9a1a7f7a8dc44a91c2.tar.bz2 openbsd-dfcfc35b3e4c9296d1b12a9a1a7f7a8dc44a91c2.zip |
Handle SSL_do_handshake() being called before SSL_provide_quic_data().
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/tls13_quic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_quic.c b/src/lib/libssl/tls13_quic.c index ceb666ac4c..92bbb011c8 100644 --- a/src/lib/libssl/tls13_quic.c +++ b/src/lib/libssl/tls13_quic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_quic.c,v 1.4 2022/08/21 19:39:44 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_quic.c,v 1.5 2022/08/27 09:12:55 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -58,6 +58,9 @@ tls13_quic_handshake_read_cb(void *buf, size_t n, void *arg) | |||
58 | { | 58 | { |
59 | struct tls13_ctx *ctx = arg; | 59 | struct tls13_ctx *ctx = arg; |
60 | 60 | ||
61 | if (ctx->hs->tls13.quic_read_buffer == NULL) | ||
62 | return TLS13_IO_WANT_POLLIN; | ||
63 | |||
61 | return tls_buffer_read(ctx->hs->tls13.quic_read_buffer, buf, n); | 64 | return tls_buffer_read(ctx->hs->tls13.quic_read_buffer, buf, n); |
62 | } | 65 | } |
63 | 66 | ||