diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2019-03-17 15:48:03 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2019-03-17 15:48:03 +0000 |
commit | 6b807b1fe6e8462341690c03d4bcefa2c7759e98 (patch) | |
tree | f52e7e886905c8139aa75f5b1825332de7dc1899 | |
parent | bb22eef1a04dd56b150b527bd08f1aa2580f97ec (diff) |
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@
-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; |