Debian Codegraph @

upstream/debian-unstable/man3/SSL_want.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "SSL_WANT 3SSL"
58 .TH SSL_WANT 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write,
65 SSL_want_x509_lookup, SSL_want_retry_verify, SSL_want_async, SSL_want_async_job,
66 SSL_want_client_hello_cb \- obtain state information TLS/SSL I/O operation
67 .SH SYNOPSIS
68 .IX Header "SYNOPSIS"
69 .Vb 1
70 \& #include <openssl/ssl.h>
71 \&
72 \& int SSL_want(const SSL *ssl);
73 \& int SSL_want_nothing(const SSL *ssl);
74 \& int SSL_want_read(const SSL *ssl);
75 \& int SSL_want_write(const SSL *ssl);
76 \& int SSL_want_x509_lookup(const SSL *ssl);
77 \& int SSL_want_retry_verify(const SSL *ssl);
78 \& int SSL_want_async(const SSL *ssl);
79 \& int SSL_want_async_job(const SSL *ssl);
80 \& int SSL_want_client_hello_cb(const SSL *ssl);
81 .Ve
82 .SH DESCRIPTION
83 .IX Header "DESCRIPTION"
84 \&\fBSSL_want()\fR returns state information for the SSL object \fBssl\fR. \fBssl\fR \fBMUST NOT\fR be NULL.
85 .PP
86 The other SSL_want_*() calls are shortcuts for the possible states returned
87 by \fBSSL_want()\fR.
88 .SH NOTES
89 .IX Header "NOTES"
90 \&\fBSSL_want()\fR examines the internal state information of the SSL object. Its
91 return values are similar to that of \fBSSL_get_error\fR\|(3).
92 Unlike \fBSSL_get_error\fR\|(3), which also evaluates the
93 error queue, the results are obtained by examining an internal state flag
94 only. The information must therefore only be used for normal operation under
95 nonblocking I/O. Error conditions are not handled and must be treated
96 using \fBSSL_get_error\fR\|(3).
97 .PP
98 The result returned by \fBSSL_want()\fR should always be consistent with
99 the result of \fBSSL_get_error\fR\|(3).
100 .SH "RETURN VALUES"
101 .IX Header "RETURN VALUES"
102 The following return values can currently occur for \fBSSL_want()\fR:
103 .IP SSL_NOTHING 4
104 .IX Item "SSL_NOTHING"
105 There is no data to be written or to be read.
106 .IP SSL_WRITING 4
107 .IX Item "SSL_WRITING"
108 There are data in the SSL buffer that must be written to the underlying
109 \&\fBBIO\fR layer in order to complete the actual SSL_*() operation.
110 A call to \fBSSL_get_error\fR\|(3) should return \fBSSL_ERROR_WANT_WRITE\fR.
111 .IP SSL_READING 4
112 .IX Item "SSL_READING"
113 More data must be read from the underlying \fBBIO\fR layer in order to
114 complete the actual SSL_*() operation.
115 A call to \fBSSL_get_error\fR\|(3) should return \fBSSL_ERROR_WANT_READ\fR.
116 .IP SSL_X509_LOOKUP 4
117 .IX Item "SSL_X509_LOOKUP"
118 The operation did not complete because an application callback set by
119 \&\fBSSL_CTX_set_client_cert_cb()\fR has asked to be called again.
120 A call to \fBSSL_get_error\fR\|(3) should return \fBSSL_ERROR_WANT_X509_LOOKUP\fR.
121 .IP SSL_RETRY_VERIFY 4
122 .IX Item "SSL_RETRY_VERIFY"
123 The operation did not complete because a certificate verification callback
124 has asked to be called again via \fBSSL_set_retry_verify\fR\|(3).
125 A call to \fBSSL_get_error\fR\|(3) should return \fBSSL_ERROR_WANT_RETRY_VERIFY\fR.
126 .IP SSL_ASYNC_PAUSED 4
127 .IX Item "SSL_ASYNC_PAUSED"
128 An asynchronous operation partially completed and was then paused. See
129 \&\fBSSL_get_all_async_fds\fR\|(3). A call to \fBSSL_get_error\fR\|(3) should return
130 \&\fBSSL_ERROR_WANT_ASYNC\fR.
131 .IP SSL_ASYNC_NO_JOBS 4
132 .IX Item "SSL_ASYNC_NO_JOBS"
133 The asynchronous job could not be started because there were no async jobs
134 available in the pool (see \fBASYNC_init_thread\fR\|(3)). A call to \fBSSL_get_error\fR\|(3)
135 should return \fBSSL_ERROR_WANT_ASYNC_JOB\fR.
136 .IP SSL_CLIENT_HELLO_CB 4
137 .IX Item "SSL_CLIENT_HELLO_CB"
138 The operation did not complete because an application callback set by
139 \&\fBSSL_CTX_set_client_hello_cb()\fR has asked to be called again.
140 A call to \fBSSL_get_error\fR\|(3) should return \fBSSL_ERROR_WANT_CLIENT_HELLO_CB\fR.
141 .PP
142 \&\fBSSL_want_nothing()\fR, \fBSSL_want_read()\fR, \fBSSL_want_write()\fR,
143 \&\fBSSL_want_x509_lookup()\fR, \fBSSL_want_retry_verify()\fR,
144 \&\fBSSL_want_async()\fR, \fBSSL_want_async_job()\fR, and \fBSSL_want_client_hello_cb()\fR
145 return 1 when the corresponding condition is true or 0 otherwise.
146 .SH "QUIC-SPECIFIC CONSIDERATIONS"
147 .IX Header "QUIC-SPECIFIC CONSIDERATIONS"
148 For QUIC, these functions relate only to the TLS handshake layer.
149 .SH "SEE ALSO"
150 .IX Header "SEE ALSO"
151 \&\fBssl\fR\|(7), \fBSSL_get_error\fR\|(3)
152 .SH HISTORY
153 .IX Header "HISTORY"
154 The \fBSSL_want_client_hello_cb()\fR function and the SSL_CLIENT_HELLO_CB return value
155 were added in OpenSSL 1.1.1.
156 .PP
157 \&\fBSSL_want_retry_verify()\fR was added in OpenSSL 3.0.
158 .SH COPYRIGHT
159 .IX Header "COPYRIGHT"
160 Copyright 2001\-2025 The OpenSSL Project Authors. All Rights Reserved.
161 .PP
162 Licensed under the Apache License 2.0 (the "License"). You may not use
163 this file except in compliance with the License. You can obtain a copy
164 in the file LICENSE in the source distribution or at
165 <https://www.openssl.org/source/license.html>.