Skip to content

Commit 07f620e

Browse files
committed
Reset the rwstate before calling ASYNC_start_job()
If an async job pauses while processing a TLS connection then the rwstate gets set to SSL_ASYNC_PAUSED. When resuming the job we should reset the rwstate back to SSL_NOTHING. In fact we can do this unconditionally since if we're about to call ASYNC_start_job() then either we are about to start the async job for the first time (in which case the rwstate should already by SSL_NOTHING), or we are restarting it after a pause (in which case reseting it to SSL_NOTHING is the correct action). Fixes openssl#16809 Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#17013)
1 parent 7a9b09f commit 07f620e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ssl/ssl_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,8 @@ static int ssl_start_async_job(SSL *s, struct ssl_async_args *args,
17701770
(s->waitctx, ssl_async_wait_ctx_cb, s))
17711771
return -1;
17721772
}
1773+
1774+
s->rwstate = SSL_NOTHING;
17731775
switch (ASYNC_start_job(&s->job, s->waitctx, &ret, func, args,
17741776
sizeof(struct ssl_async_args))) {
17751777
case ASYNC_ERR:

0 commit comments

Comments
 (0)