5 SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup - obtain state information TLS/SSL I/O operation
9 #include <openssl/ssl.h>
11 int SSL_want(const SSL *ssl);
12 int SSL_want_nothing(const SSL *ssl);
13 int SSL_want_read(const SSL *ssl);
14 int SSL_want_write(const SSL *ssl);
15 int SSL_want_x509_lookup(const SSL *ssl);
19 SSL_want() returns state information for the SSL object B<ssl>.
21 The other SSL_want_*() calls are shortcuts for the possible states returned
26 SSL_want() examines the internal state information of the SSL object. Its
27 return values are similar to that of L<SSL_get_error(3)|SSL_get_error(3)>.
28 Unlike L<SSL_get_error(3)|SSL_get_error(3)>, which also evaluates the
29 error queue, the results are obtained by examining an internal state flag
30 only. The information must therefore only be used for normal operation under
31 non-blocking I/O. Error conditions are not handled and must be treated
32 using L<SSL_get_error(3)|SSL_get_error(3)>.
34 The result returned by SSL_want() should always be consistent with
35 the result of L<SSL_get_error(3)|SSL_get_error(3)>.
39 The following return values can currently occur for SSL_want():
45 There is no data to be written or to be read.
49 There are data in the SSL buffer that must be written to the underlying
50 B<BIO> layer in order to complete the actual SSL_*() operation.
51 A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
56 More data must be read from the underlying B<BIO> layer in order to
57 complete the actual SSL_*() operation.
58 A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
63 The operation did not complete because an application callback set by
64 SSL_CTX_set_client_cert_cb() has asked to be called again.
65 A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
66 SSL_ERROR_WANT_X509_LOOKUP.
70 SSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup()
71 return 1, when the corresponding condition is true or 0 otherwise.
75 L<ssl(3)|ssl(3)>, L<err(3)|err(3)>, L<SSL_get_error(3)|SSL_get_error(3)>