From 08aa1de76d746545bb36aea72b4204fdaa408aad Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 17 Mar 2019 15:48:02 +0000 Subject: 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@ --- src/lib/libssl/tls13_handshake.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index 536630ac33..a55c20525a 100644 --- a/src/lib/libssl/tls13_handshake.c +++ b/src/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 * Copyright (c) 2019 Joel Sing @@ -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; -- cgit v1.2.3-55-g6feb