Fix referenses in section 3 manuals
[openssl.git] / doc / man3 / SSL_want.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup,
6 SSL_want_async, SSL_want_async_job - obtain state information TLS/SSL I/O
7 operation
8
9 =head1 SYNOPSIS
10
11  #include <openssl/ssl.h>
12
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
21 =head1 DESCRIPTION
22
23 SSL_want() returns state information for the SSL object B<ssl>.
24
25 The other SSL_want_*() calls are shortcuts for the possible states returned
26 by SSL_want().
27
28 =head1 NOTES
29
30 SSL_want() examines the internal state information of the SSL object. Its
31 return values are similar to that of L<SSL_get_error(3)>.
32 Unlike L<SSL_get_error(3)>, which also evaluates the
33 error queue, the results are obtained by examining an internal state flag
34 only. The information must therefore only be used for normal operation under
35 non-blocking I/O. Error conditions are not handled and must be treated
36 using L<SSL_get_error(3)>.
37
38 The result returned by SSL_want() should always be consistent with
39 the result of L<SSL_get_error(3)>.
40
41 =head1 RETURN VALUES
42
43 The following return values can currently occur for SSL_want():
44
45 =over 4
46
47 =item SSL_NOTHING
48
49 There is no data to be written or to be read.
50
51 =item SSL_WRITING
52
53 There are data in the SSL buffer that must be written to the underlying
54 B<BIO> layer in order to complete the actual SSL_*() operation.
55 A call to L<SSL_get_error(3)> should return
56 SSL_ERROR_WANT_WRITE.
57
58 =item SSL_READING
59
60 More data must be read from the underlying B<BIO> layer in order to
61 complete the actual SSL_*() operation.
62 A call to L<SSL_get_error(3)> should return
63 SSL_ERROR_WANT_READ.
64
65 =item SSL_X509_LOOKUP
66
67 The operation did not complete because an application callback set by
68 SSL_CTX_set_client_cert_cb() has asked to be called again.
69 A call to L<SSL_get_error(3)> should return
70 SSL_ERROR_WANT_X509_LOOKUP.
71
72 =item SSL_ASYNC_PAUSED
73
74 An asynchronous operation partially completed and was then paused. See
75 L<SSL_get_all_async_fds(3)>. A call to L<SSL_get_error(3)> should return
76 SSL_ERROR_WANT_ASYNC.
77
78 =item SSL_ASYNC_NO_JOBS
79
80 The asynchronous job could not be started because there were no async jobs
81 available in the pool (see ASYNC_init_thread(3)). A call to L<SSL_get_error(3)>
82 should return SSL_ERROR_WANT_ASYNC_JOB.
83
84 =back
85
86 SSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup(),
87 SSL_want_async() and SSL_want_async_job() return 1, when the corresponding
88 condition is true or 0 otherwise.
89
90 =head1 SEE ALSO
91
92 L<ssl(7)>, L<err(7)>, L<SSL_get_error(3)>
93
94 =head1 COPYRIGHT
95
96 Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
97
98 Licensed under the OpenSSL license (the "License").  You may not use
99 this file except in compliance with the License.  You can obtain a copy
100 in the file LICENSE in the source distribution or at
101 L<https://www.openssl.org/source/license.html>.
102
103 =cut