aboutsummaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-05-03 17:55:00 +0100
committerMatt Caswell <matt@openssl.org>2016-05-05 19:39:14 +0100
commitfc7f190c732729c1d0eb9dcdb7ff05ed6b06056f (patch)
treeb4b70753df865b62635b71b1ad177a1b0582a6d0 /apps/s_server.c
parent0eadff033fea00f1b9abe0a83bf0d6637690f085 (diff)
downloadopenssl-fc7f190c732729c1d0eb9dcdb7ff05ed6b06056f.tar.gz
Handle no async jobs in libssl
If the application has limited the size of the async pool using ASYNC_init_thread() then we could run out of jobs while trying to start a libssl io operation. However libssl was failing to handle this and treating it like a fatal error. It should not be fatal...we just need to retry when there are jobs available again. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index f0b28fd288..9cbff09b85 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2421,6 +2421,10 @@ static int sv_body(int s, int stype, unsigned char *context)
case SSL_ERROR_WANT_X509_LOOKUP:
BIO_printf(bio_s_out, "Write BLOCK\n");
break;
+ case SSL_ERROR_WANT_ASYNC_JOB:
+ /*
+ * This shouldn't ever happen in s_server. Treat as an error
+ */
case SSL_ERROR_SYSCALL:
case SSL_ERROR_SSL:
BIO_printf(bio_s_out, "ERROR\n");
@@ -2495,6 +2499,10 @@ static int sv_body(int s, int stype, unsigned char *context)
case SSL_ERROR_WANT_READ:
BIO_printf(bio_s_out, "Read BLOCK\n");
break;
+ case SSL_ERROR_WANT_ASYNC_JOB:
+ /*
+ * This shouldn't ever happen in s_server. Treat as an error
+ */
case SSL_ERROR_SYSCALL:
case SSL_ERROR_SSL:
BIO_printf(bio_s_out, "ERROR\n");