1SSL_WANT(3ossl)                     OpenSSL                    SSL_WANT(3ossl)
2
3
4

NAME

6       SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write,
7       SSL_want_x509_lookup, SSL_want_retry_verify, SSL_want_async,
8       SSL_want_async_job, SSL_want_client_hello_cb - obtain state information
9       TLS/SSL I/O operation
10

SYNOPSIS

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_retry_verify(const SSL *ssl);
20        int SSL_want_async(const SSL *ssl);
21        int SSL_want_async_job(const SSL *ssl);
22        int SSL_want_client_hello_cb(const SSL *ssl);
23

DESCRIPTION

25       SSL_want() returns state information for the SSL object ssl.
26
27       The other SSL_want_*() calls are shortcuts for the possible states
28       returned by SSL_want().
29

NOTES

31       SSL_want() examines the internal state information of the SSL object.
32       Its return values are similar to that of SSL_get_error(3).  Unlike
33       SSL_get_error(3), which also evaluates the error queue, the results are
34       obtained by examining an internal state flag only. The information must
35       therefore only be used for normal operation under nonblocking I/O.
36       Error conditions are not handled and must be treated using
37       SSL_get_error(3).
38
39       The result returned by SSL_want() should always be consistent with the
40       result of SSL_get_error(3).
41

RETURN VALUES

43       The following return values can currently occur for SSL_want():
44
45       SSL_NOTHING
46           There is no data to be written or to be read.
47
48       SSL_WRITING
49           There are data in the SSL buffer that must be written to the
50           underlying BIO layer in order to complete the actual SSL_*()
51           operation.  A call to SSL_get_error(3) should return
52           SSL_ERROR_WANT_WRITE.
53
54       SSL_READING
55           More data must be read from the underlying BIO layer in order to
56           complete the actual SSL_*() operation.  A call to SSL_get_error(3)
57           should return SSL_ERROR_WANT_READ.
58
59       SSL_X509_LOOKUP
60           The operation did not complete because an application callback set
61           by SSL_CTX_set_client_cert_cb() has asked to be called again.  A
62           call to SSL_get_error(3) should return SSL_ERROR_WANT_X509_LOOKUP.
63
64       SSL_RETRY_VERIFY
65           The operation did not complete because a certificate verification
66           callback has asked to be called again via SSL_set_retry_verify(3).
67           A call to SSL_get_error(3) should return
68           SSL_ERROR_WANT_RETRY_VERIFY.
69
70       SSL_ASYNC_PAUSED
71           An asynchronous operation partially completed and was then paused.
72           See SSL_get_all_async_fds(3). A call to SSL_get_error(3) should
73           return SSL_ERROR_WANT_ASYNC.
74
75       SSL_ASYNC_NO_JOBS
76           The asynchronous job could not be started because there were no
77           async jobs available in the pool (see ASYNC_init_thread(3)). A call
78           to SSL_get_error(3) should return SSL_ERROR_WANT_ASYNC_JOB.
79
80       SSL_CLIENT_HELLO_CB
81           The operation did not complete because an application callback set
82           by SSL_CTX_set_client_hello_cb() has asked to be called again.  A
83           call to SSL_get_error(3) should return
84           SSL_ERROR_WANT_CLIENT_HELLO_CB.
85
86       SSL_want_nothing(), SSL_want_read(), SSL_want_write(),
87       SSL_want_x509_lookup(), SSL_want_retry_verify(), SSL_want_async(),
88       SSL_want_async_job(), and SSL_want_client_hello_cb() return 1 when the
89       corresponding condition is true or 0 otherwise.
90

SEE ALSO

92       ssl(7), SSL_get_error(3)
93

HISTORY

95       The SSL_want_client_hello_cb() function and the SSL_CLIENT_HELLO_CB
96       return value were added in OpenSSL 1.1.1.
97
99       Copyright 2001-2022 The OpenSSL Project Authors. All Rights Reserved.
100
101       Licensed under the Apache License 2.0 (the "License").  You may not use
102       this file except in compliance with the License.  You can obtain a copy
103       in the file LICENSE in the source distribution or at
104       <https://www.openssl.org/source/license.html>.
105
106
107
1083.1.1                             2023-08-31                   SSL_WANT(3ossl)
Impressum