diff options
author | jsing <> | 2019-01-19 03:32:03 +0000 |
---|---|---|
committer | jsing <> | 2019-01-19 03:32:03 +0000 |
commit | 7307a8285d2bab3e12d69b620aba48a1554ea4f7 (patch) | |
tree | f493cbe95fba014d831638f1d10fb228a19b687f /src/lib/libssl/tls13_internal.h | |
parent | 42054c37e8c4909fd3f52fef943929aa2affc6fd (diff) | |
download | openbsd-7307a8285d2bab3e12d69b620aba48a1554ea4f7.tar.gz openbsd-7307a8285d2bab3e12d69b620aba48a1554ea4f7.tar.bz2 openbsd-7307a8285d2bab3e12d69b620aba48a1554ea4f7.zip |
Tweak return value handling in the TLSv1.3 handshake code.
The I/O paths are from the tls13_handshake_send_action() and
tls13_handshake_recv_action() functions - both of these need to propagate
I/O conditions (EOF, failure, want poll in, want poll out) up the stack,
so we need to capture and return values <= 0. Use an I/O condition to
indicate successful handshake completion.
Also, the various send/recv functions are currently unimplemented, so
return 0 (failure) rather than 1 (success).
ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_internal.h')
-rw-r--r-- | src/lib/libssl/tls13_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h index e672df37e3..876f339c80 100644 --- a/src/lib/libssl/tls13_internal.h +++ b/src/lib/libssl/tls13_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_internal.h,v 1.7 2019/01/18 06:51:29 tb Exp $ */ | 1 | /* $OpenBSD: tls13_internal.h,v 1.8 2019/01/19 03:32:03 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> |
4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -25,7 +25,8 @@ | |||
25 | 25 | ||
26 | __BEGIN_HIDDEN_DECLS | 26 | __BEGIN_HIDDEN_DECLS |
27 | 27 | ||
28 | #define TLS13_IO_EOF 0 | 28 | #define TLS13_IO_SUCCESS 1 |
29 | #define TLS13_IO_EOF 0 | ||
29 | #define TLS13_IO_FAILURE -1 | 30 | #define TLS13_IO_FAILURE -1 |
30 | #define TLS13_IO_WANT_POLLIN -2 | 31 | #define TLS13_IO_WANT_POLLIN -2 |
31 | #define TLS13_IO_WANT_POLLOUT -3 | 32 | #define TLS13_IO_WANT_POLLOUT -3 |