diff options
author | 2019-02-26 17:36:30 +0000 | |
---|---|---|
committer | 2019-02-26 17:36:30 +0000 | |
commit | fd2e521eb3f641ad23461c0acb1c4c443e2f3a34 (patch) | |
tree | 7f3db4ef3235dcdff3d4d4dd6e6efa7d10850e94 /lib/libssl/tls13_lib.c | |
parent | Correctly handle tls_read() and tls_write() failures. (diff) | |
download | wireguard-openbsd-fd2e521eb3f641ad23461c0acb1c4c443e2f3a34.tar.xz wireguard-openbsd-fd2e521eb3f641ad23461c0acb1c4c443e2f3a34.zip |
Correctly propagate EOF from BIO in tls13_legacy_wire_read().
ok tb@
Diffstat (limited to 'lib/libssl/tls13_lib.c')
-rw-r--r-- | lib/libssl/tls13_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libssl/tls13_lib.c b/lib/libssl/tls13_lib.c index d8a22c8fc7b..0151395be81 100644 --- a/lib/libssl/tls13_lib.c +++ b/lib/libssl/tls13_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_lib.c,v 1.5 2019/02/23 15:00:44 jsing Exp $ */ +/* $OpenBSD: tls13_lib.c,v 1.6 2019/02/26 17:36:30 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> * @@ -141,6 +141,8 @@ tls13_legacy_wire_read(SSL *ssl, uint8_t *buf, size_t len) return TLS13_IO_WANT_POLLIN; if (BIO_should_write(ssl->rbio)) return TLS13_IO_WANT_POLLOUT; + if (n == 0) + return TLS13_IO_EOF; return TLS13_IO_FAILURE; } |