summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_lib.c
diff options
context:
space:
mode:
authorbeck <>2020-01-24 04:36:29 +0000
committerbeck <>2020-01-24 04:36:29 +0000
commit9bdb8cf2b0cdef5430b92da746812d02b3e4a0db (patch)
tree1e380b51c8b8b1ef639f72f8967a2a3aab5f9349 /src/lib/libssl/tls13_lib.c
parent7136a54d43d7b515b6d9043faeb359a87cf1ab0f (diff)
downloadopenbsd-9bdb8cf2b0cdef5430b92da746812d02b3e4a0db.tar.gz
openbsd-9bdb8cf2b0cdef5430b92da746812d02b3e4a0db.tar.bz2
openbsd-9bdb8cf2b0cdef5430b92da746812d02b3e4a0db.zip
Fix breakage in SSL_connect, SSL_accept, etc. by not propagating
new retry conditions from the record layer all the way up to the callers. Instead we catch them at the top of the record layer and retry the operations, unless we actually got a retry indicated from actual IO operations. ok jsing@ tb@
Diffstat (limited to 'src/lib/libssl/tls13_lib.c')
-rw-r--r--src/lib/libssl/tls13_lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c
index 473163ee76..cfe3985050 100644
--- a/src/lib/libssl/tls13_lib.c
+++ b/src/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_lib.c,v 1.26 2020/01/23 11:57:20 jsing Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.27 2020/01/24 04:36:29 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org>
@@ -420,6 +420,10 @@ tls13_legacy_return_code(SSL *ssl, ssize_t ret)
420 BIO_set_retry_write(ssl->wbio); 420 BIO_set_retry_write(ssl->wbio);
421 ssl->internal->rwstate = SSL_WRITING; 421 ssl->internal->rwstate = SSL_WRITING;
422 return -1; 422 return -1;
423
424 case TLS13_IO_WANT_RETRY:
425 SSLerror(ssl, ERR_R_INTERNAL_ERROR);
426 return -1;
423 } 427 }
424 428
425 SSLerror(ssl, ERR_R_INTERNAL_ERROR); 429 SSLerror(ssl, ERR_R_INTERNAL_ERROR);