diff options
author | jsing <> | 2019-03-17 15:48:02 +0000 |
---|---|---|
committer | jsing <> | 2019-03-17 15:48:02 +0000 |
commit | 08aa1de76d746545bb36aea72b4204fdaa408aad (patch) | |
tree | 9a14046c43fbb0de32c78bc9d2073c4135aa7e4b | |
parent | 02f7540b7cb04e4e3a520c240503b8185e76f372 (diff) | |
download | openbsd-08aa1de76d746545bb36aea72b4204fdaa408aad.tar.gz openbsd-08aa1de76d746545bb36aea72b4204fdaa408aad.tar.bz2 openbsd-08aa1de76d746545bb36aea72b4204fdaa408aad.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@
-rw-r--r-- | src/lib/libssl/tls13_handshake.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: tls13_handshake.c,v 1.31 2019/02/28 17:56:43 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.32 2019/03/17 15:48:02 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> |
4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> |
@@ -382,7 +382,9 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, | |||
382 | } | 382 | } |
383 | 383 | ||
384 | /* XXX provide CBS and check all consumed. */ | 384 | /* XXX provide CBS and check all consumed. */ |
385 | ret = action->recv(ctx); | 385 | ret = TLS13_IO_FAILURE; |
386 | if (action->recv(ctx)) | ||
387 | ret = TLS13_IO_SUCCESS; | ||
386 | 388 | ||
387 | tls13_handshake_msg_free(ctx->hs_msg); | 389 | tls13_handshake_msg_free(ctx->hs_msg); |
388 | ctx->hs_msg = NULL; | 390 | ctx->hs_msg = NULL; |