5 SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup,
6 SSL_want_async, SSL_want_async_job, SSL_want_early - obtain state information
11 #include <openssl/ssl.h>
13 int SSL_want(const SSL *ssl);
14 int SSL_want_nothing(const SSL *ssl);
15 int SSL_want_read(const SSL *ssl);
16 int SSL_want_write(const SSL *ssl);
17 int SSL_want_x509_lookup(const SSL *ssl);
18 int SSL_want_async(const SSL *ssl);
19 int SSL_want_async_job(const SSL *ssl);
20 int SSL_want_early(const SSL *ssl);
24 SSL_want() returns state information for the SSL object B<ssl>.
26 The other SSL_want_*() calls are shortcuts for the possible states returned
31 SSL_want() examines the internal state information of the SSL object. Its
32 return values are similar to that of L<SSL_get_error(3)>.
33 Unlike L<SSL_get_error(3)>, which also evaluates the
34 error queue, the results are obtained by examining an internal state flag
35 only. The information must therefore only be used for normal operation under
36 non-blocking I/O. Error conditions are not handled and must be treated
37 using L<SSL_get_error(3)>.
39 The result returned by SSL_want() should always be consistent with
40 the result of L<SSL_get_error(3)>.
44 The following return values can currently occur for SSL_want():
50 There is no data to be written or to be read.
54 There are data in the SSL buffer that must be written to the underlying
55 B<BIO> layer in order to complete the actual SSL_*() operation.
56 A call to L<SSL_get_error(3)> should return
61 More data must be read from the underlying B<BIO> layer in order to
62 complete the actual SSL_*() operation.
63 A call to L<SSL_get_error(3)> should return
68 The operation did not complete because an application callback set by
69 SSL_CTX_set_client_cert_cb() has asked to be called again.
70 A call to L<SSL_get_error(3)> should return
71 SSL_ERROR_WANT_X509_LOOKUP.
73 =item SSL_ASYNC_PAUSED
75 An asynchronous operation partially completed and was then paused. See
76 L<SSL_get_all_async_fds(3)>. A call to L<SSL_get_error(3)> should return
79 =item SSL_ASYNC_NO_JOBS
81 The asynchronous job could not be started because there were no async jobs
82 available in the pool (see ASYNC_init_thread(3)). A call to L<SSL_get_error(3)>
83 should return SSL_ERROR_WANT_ASYNC_JOB.
87 The operation did not complete because an application callback set by
88 SSL_CTX_set_early_cb() has asked to be called again.
89 A call to L<SSL_get_error(3)> should return
94 SSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup(),
95 SSL_want_async(), SSL_want_async_job(), and SSL_want_early() return 1, when
96 the corresponding condition is true or 0 otherwise.
100 L<ssl(7)>, L<SSL_get_error(3)>
104 SSL_want_early() and SSL_EARLY_WORK were added in OpenSSL 1.1.1.
108 Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
110 Licensed under the OpenSSL license (the "License"). You may not use
111 this file except in compliance with the License. You can obtain a copy
112 in the file LICENSE in the source distribution or at
113 L<https://www.openssl.org/source/license.html>.