diff options
| author | jsing <> | 2019-03-17 15:48:02 +0000 |
|---|---|---|
| committer | jsing <> | 2019-03-17 15:48:02 +0000 |
| commit | e07c86a43edca4325346bcb4c9cff1d5f07d75df (patch) | |
| tree | 9a14046c43fbb0de32c78bc9d2073c4135aa7e4b /src/lib/libssl/tls13_handshake.c | |
| parent | c42c84ca93a06fba03321d1c4ecf28e9db679081 (diff) | |
| download | openbsd-e07c86a43edca4325346bcb4c9cff1d5f07d75df.tar.gz openbsd-e07c86a43edca4325346bcb4c9cff1d5f07d75df.tar.bz2 openbsd-e07c86a43edca4325346bcb4c9cff1d5f07d75df.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 '')
| -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; |
