diff options
author | Matt Caswell <matt@openssl.org> | 2016-05-03 17:55:00 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-05 19:39:14 +0100 |
commit | fc7f190c732729c1d0eb9dcdb7ff05ed6b06056f (patch) | |
tree | b4b70753df865b62635b71b1ad177a1b0582a6d0 /include/openssl | |
parent | 0eadff033fea00f1b9abe0a83bf0d6637690f085 (diff) | |
download | openssl-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 'include/openssl')
-rw-r--r-- | include/openssl/ssl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 3f732c8fd3..0ab0df2749 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -884,6 +884,7 @@ __owur int SSL_extension_supported(unsigned int ext_type); # define SSL_READING 3 # define SSL_X509_LOOKUP 4 # define SSL_ASYNC_PAUSED 5 +# define SSL_ASYNC_NO_JOBS 6 /* These will only be used when doing non-blocking IO */ # define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) @@ -891,6 +892,7 @@ __owur int SSL_extension_supported(unsigned int ext_type); # define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) # define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) # define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED) +# define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS) # define SSL_MAC_FLAG_READ_MAC_STREAM 1 # define SSL_MAC_FLAG_WRITE_MAC_STREAM 2 @@ -1122,6 +1124,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_ERROR_WANT_CONNECT 7 # define SSL_ERROR_WANT_ACCEPT 8 # define SSL_ERROR_WANT_ASYNC 9 +# define SSL_ERROR_WANT_ASYNC_JOB 10 # define SSL_CTRL_SET_TMP_DH 3 # define SSL_CTRL_SET_TMP_ECDH 4 # define SSL_CTRL_SET_TMP_DH_CB 6 |