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>
This commit is contained in:
parent
826760945d
commit
4cfa6204e8
@ -2662,7 +2662,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
i = BIO_gets(io, buf, bufsize - 1);
|
i = BIO_gets(io, buf, bufsize - 1);
|
||||||
if (i < 0) { /* error */
|
if (i < 0) { /* error */
|
||||||
if (!BIO_should_retry(io)) {
|
if (!BIO_should_retry(io) && !SSL_waiting_for_async(con)) {
|
||||||
if (!s_quiet)
|
if (!s_quiet)
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
goto err;
|
goto err;
|
||||||
@ -2929,7 +2929,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context)
|
|||||||
#endif
|
#endif
|
||||||
k = BIO_write(io, &(buf[j]), i - j);
|
k = BIO_write(io, &(buf[j]), i - j);
|
||||||
if (k <= 0) {
|
if (k <= 0) {
|
||||||
if (!BIO_should_retry(io))
|
if (!BIO_should_retry(io) && !SSL_waiting_for_async(con))
|
||||||
goto write_error;
|
goto write_error;
|
||||||
else {
|
else {
|
||||||
BIO_printf(bio_s_out, "rwrite W BLOCK\n");
|
BIO_printf(bio_s_out, "rwrite W BLOCK\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user