1SSL_WANT(3) OpenSSL SSL_WANT(3)
2
3
4
6 SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write,
7 SSL_want_x509_lookup, SSL_want_async, SSL_want_async_job,
8 SSL_want_client_hello_cb - obtain state information TLS/SSL I/O
9 operation
10
12 #include <openssl/ssl.h>
13
14 int SSL_want(const SSL *ssl);
15 int SSL_want_nothing(const SSL *ssl);
16 int SSL_want_read(const SSL *ssl);
17 int SSL_want_write(const SSL *ssl);
18 int SSL_want_x509_lookup(const SSL *ssl);
19 int SSL_want_async(const SSL *ssl);
20 int SSL_want_async_job(const SSL *ssl);
21 int SSL_want_client_hello_cb(const SSL *ssl);
22
24 SSL_want() returns state information for the SSL object ssl.
25
26 The other SSL_want_*() calls are shortcuts for the possible states
27 returned by SSL_want().
28
30 SSL_want() examines the internal state information of the SSL object.
31 Its return values are similar to that of SSL_get_error(3). Unlike
32 SSL_get_error(3), which also evaluates the error queue, the results are
33 obtained by examining an internal state flag only. The information must
34 therefore only be used for normal operation under nonblocking I/O.
35 Error conditions are not handled and must be treated using
36 SSL_get_error(3).
37
38 The result returned by SSL_want() should always be consistent with the
39 result of SSL_get_error(3).
40
42 The following return values can currently occur for SSL_want():
43
44 SSL_NOTHING
45 There is no data to be written or to be read.
46
47 SSL_WRITING
48 There are data in the SSL buffer that must be written to the
49 underlying BIO layer in order to complete the actual SSL_*()
50 operation. A call to SSL_get_error(3) should return
51 SSL_ERROR_WANT_WRITE.
52
53 SSL_READING
54 More data must be read from the underlying BIO layer in order to
55 complete the actual SSL_*() operation. A call to SSL_get_error(3)
56 should return SSL_ERROR_WANT_READ.
57
58 SSL_X509_LOOKUP
59 The operation did not complete because an application callback set
60 by SSL_CTX_set_client_cert_cb() has asked to be called again. A
61 call to SSL_get_error(3) should return SSL_ERROR_WANT_X509_LOOKUP.
62
63 SSL_ASYNC_PAUSED
64 An asynchronous operation partially completed and was then paused.
65 See SSL_get_all_async_fds(3). A call to SSL_get_error(3) should
66 return SSL_ERROR_WANT_ASYNC.
67
68 SSL_ASYNC_NO_JOBS
69 The asynchronous job could not be started because there were no
70 async jobs available in the pool (see ASYNC_init_thread(3)). A call
71 to SSL_get_error(3) should return SSL_ERROR_WANT_ASYNC_JOB.
72
73 SSL_CLIENT_HELLO_CB
74 The operation did not complete because an application callback set
75 by SSL_CTX_set_client_hello_cb() has asked to be called again. A
76 call to SSL_get_error(3) should return
77 SSL_ERROR_WANT_CLIENT_HELLO_CB.
78
79 SSL_want_nothing(), SSL_want_read(), SSL_want_write(),
80 SSL_want_x509_lookup(), SSL_want_async(), SSL_want_async_job(), and
81 SSL_want_client_hello_cb() return 1, when the corresponding condition
82 is true or 0 otherwise.
83
85 ssl(7), SSL_get_error(3)
86
88 The SSL_want_client_hello_cb() function and the SSL_CLIENT_HELLO_CB
89 return value were added in OpenSSL 1.1.1.
90
92 Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
93
94 Licensed under the OpenSSL license (the "License"). You may not use
95 this file except in compliance with the License. You can obtain a copy
96 in the file LICENSE in the source distribution or at
97 <https://www.openssl.org/source/license.html>.
98
99
100
1011.1.1q 2022-07-21 SSL_WANT(3)