summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libtls/tls.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 76d00e53f3..783d320a9d 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.38 2016/05/27 14:38:40 jsing Exp $ */ 1/* $OpenBSD: tls.c,v 1.39 2016/07/06 02:32:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -418,8 +418,11 @@ tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret, const char *prefix)
418 if ((err = ERR_peek_error()) != 0) { 418 if ((err = ERR_peek_error()) != 0) {
419 errstr = ERR_error_string(err, NULL); 419 errstr = ERR_error_string(err, NULL);
420 } else if (ssl_ret == 0) { 420 } else if (ssl_ret == 0) {
421 ctx->state |= TLS_EOF_NO_CLOSE_NOTIFY; 421 if ((ctx->state & TLS_HANDSHAKE_COMPLETE) != 0) {
422 return (0); 422 ctx->state |= TLS_EOF_NO_CLOSE_NOTIFY;
423 return (0);
424 }
425 errstr = "unexpected EOF";
423 } else if (ssl_ret == -1) { 426 } else if (ssl_ret == -1) {
424 errstr = strerror(errno); 427 errstr = strerror(errno);
425 } 428 }