diff options
author | 2019-03-17 15:48:02 +0000 | |
---|---|---|
committer | 2019-03-17 15:48:02 +0000 | |
commit | 208e8f194acb28ed3c77aafb1258ea53fbdba350 (patch) | |
tree | d48404cf8bc3c714d04b80a0e48a040843f33e35 /lib/libssl/tls13_handshake.c | |
parent | Partially clean up the TLS1_get_{,client}_version macros. (diff) | |
download | wireguard-openbsd-208e8f194acb28ed3c77aafb1258ea53fbdba350.tar.xz wireguard-openbsd-208e8f194acb28ed3c77aafb1258ea53fbdba350.zip |
Correct return value handling in tls13_handshake_recv_action().
The recv action handler returns success/failure, rather than a TLS13_IO_*
value, which is what tls13_handshake_recv_action() needs to return.
Failure previously mapped to TLS13_IO_EOF, which is not ideal.
ok tb@
Diffstat (limited to 'lib/libssl/tls13_handshake.c')
-rw-r--r-- | lib/libssl/tls13_handshake.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/tls13_handshake.c b/lib/libssl/tls13_handshake.c index 536630ac33c..a55c20525a5 100644 --- a/lib/libssl/tls13_handshake.c +++ b/lib/libssl/tls13_handshake.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_handshake.c,v 1.31 2019/02/28 17:56:43 jsing Exp $ */ +/* $OpenBSD: tls13_handshake.c,v 1.32 2019/03/17 15:48:02 jsing Exp $ */ /* * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> @@ -382,7 +382,9 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, } /* XXX provide CBS and check all consumed. */ - ret = action->recv(ctx); + ret = TLS13_IO_FAILURE; + if (action->recv(ctx)) + ret = TLS13_IO_SUCCESS; tls13_handshake_msg_free(ctx->hs_msg); ctx->hs_msg = NULL; |