diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-27 15:20:24 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-20 23:32:18 +0000 |
commit | 4cfa6204e8740a3e89b96fac3f1ac49d137e9dc9 (patch) | |
tree | 3db4b0d9724882ee483cfbbb99377fd5c6152e2c /apps/s_server.c | |
parent | 826760945de655d2d2d387cac3a3646ced80977e (diff) |
Fix s_server -WWW with -async
The s_server option -WWW was not async aware, and therefore was not
handling SSL_ERROR_WANT_ASYNC conditions. This commit fixes that.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index da093523c5..548eacbbce 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2662,7 +2662,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) for (;;) { i = BIO_gets(io, buf, bufsize - 1); if (i < 0) { /* error */ - if (!BIO_should_retry(io)) { + if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) { if (!s_quiet) ERR_print_errors(bio_err); goto err; @@ -2929,7 +2929,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) #endif k = BIO_write(io, &(buf[j]), i - j); if (k <= 0) { - if (!BIO_should_retry(io)) + if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) goto write_error; else { BIO_printf(bio_s_out, "rwrite W BLOCK\n"); |