| 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_GET_ALL_ASYNC_FDS 3SSL" |
| 58 |
.TH SSL_GET_ALL_ASYNC_FDS 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_waiting_for_async, |
| 65 |
SSL_get_all_async_fds, |
| 66 |
SSL_get_changed_async_fds |
| 67 |
\&\- manage asynchronous operations |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
.Vb 2 |
| 71 |
\& #include <openssl/async.h> |
| 72 |
\& #include <openssl/ssl.h> |
| 73 |
\& |
| 74 |
\& int SSL_waiting_for_async(SSL *s); |
| 75 |
\& int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fd, size_t *numfds); |
| 76 |
\& int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds, |
| 77 |
\& OSSL_ASYNC_FD *delfd, size_t *numdelfds); |
| 78 |
.Ve |
| 79 |
.SH DESCRIPTION |
| 80 |
.IX Header "DESCRIPTION" |
| 81 |
\&\fBSSL_waiting_for_async()\fR determines whether an SSL connection is currently |
| 82 |
waiting for asynchronous operations to complete (see the \fBSSL_MODE_ASYNC\fR mode |
| 83 |
in \fBSSL_CTX_set_mode\fR\|(3)). |
| 84 |
.PP |
| 85 |
\&\fBSSL_get_all_async_fds()\fR returns a list of file descriptor which can be used in a |
| 86 |
call to \fBselect()\fR or \fBpoll()\fR to determine whether the current asynchronous |
| 87 |
operation has completed or not. A completed operation will result in data |
| 88 |
appearing as "read ready" on the file descriptor (no actual data should be read |
| 89 |
from the file descriptor). This function should only be called if the \fBSSL\fR |
| 90 |
object is currently waiting for asynchronous work to complete (i.e. |
| 91 |
\&\fBSSL_ERROR_WANT_ASYNC\fR has been received \- see \fBSSL_get_error\fR\|(3)). Typically |
| 92 |
the list will only contain one file descriptor. However, if multiple asynchronous |
| 93 |
capable engines are in use then more than one is possible. The number of file |
| 94 |
descriptors returned is stored in \fI*numfds\fR and the file descriptors themselves |
| 95 |
are in \fI*fds\fR. The \fIfds\fR parameter may be NULL in which case no file |
| 96 |
descriptors are returned but \fI*numfds\fR is still populated. It is the callers |
| 97 |
responsibility to ensure sufficient memory is allocated at \fI*fds\fR so typically |
| 98 |
this function is called twice (once with a NULL \fIfds\fR parameter and once |
| 99 |
without). |
| 100 |
.PP |
| 101 |
\&\fBSSL_get_changed_async_fds()\fR returns a list of the asynchronous file descriptors |
| 102 |
that have been added and a list that have been deleted since the last |
| 103 |
\&\fBSSL_ERROR_WANT_ASYNC\fR was received (or since the \fBSSL\fR object was created if |
| 104 |
no \fBSSL_ERROR_WANT_ASYNC\fR has been received). Similar to \fBSSL_get_all_async_fds()\fR |
| 105 |
it is the callers responsibility to ensure that \fI*addfd\fR and \fI*delfd\fR have |
| 106 |
sufficient memory allocated, although they may be NULL. The number of added fds |
| 107 |
and the number of deleted fds are stored in \fI*numaddfds\fR and \fI*numdelfds\fR |
| 108 |
respectively. |
| 109 |
.SH "RETURN VALUES" |
| 110 |
.IX Header "RETURN VALUES" |
| 111 |
\&\fBSSL_waiting_for_async()\fR will return 1 if the current SSL operation is waiting |
| 112 |
for an async operation to complete and 0 otherwise. |
| 113 |
.PP |
| 114 |
\&\fBSSL_get_all_async_fds()\fR and \fBSSL_get_changed_async_fds()\fR return 1 on success or |
| 115 |
0 on error. |
| 116 |
.SH NOTES |
| 117 |
.IX Header "NOTES" |
| 118 |
On Windows platforms the \fI<openssl/async.h>\fR header is dependent on some |
| 119 |
of the types customarily made available by including \fI<windows.h>\fR. The |
| 120 |
application developer is likely to require control over when the latter |
| 121 |
is included, commonly as one of the first included headers. Therefore, |
| 122 |
it is defined as an application developer's responsibility to include |
| 123 |
\&\fI<windows.h>\fR prior to \fI<openssl/async.h>\fR. |
| 124 |
.SH "SEE ALSO" |
| 125 |
.IX Header "SEE ALSO" |
| 126 |
\&\fBssl\fR\|(7), |
| 127 |
\&\fBSSL_get_error\fR\|(3), \fBSSL_CTX_set_mode\fR\|(3) |
| 128 |
.SH HISTORY |
| 129 |
.IX Header "HISTORY" |
| 130 |
The \fBSSL_waiting_for_async()\fR, \fBSSL_get_all_async_fds()\fR |
| 131 |
and \fBSSL_get_changed_async_fds()\fR functions were added in OpenSSL 1.1.0. |
| 132 |
.SH COPYRIGHT |
| 133 |
.IX Header "COPYRIGHT" |
| 134 |
Copyright 2016\-2021 The OpenSSL Project Authors. All Rights Reserved. |
| 135 |
.PP |
| 136 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 137 |
this file except in compliance with the License. You can obtain a copy |
| 138 |
in the file LICENSE in the source distribution or at |
| 139 |
<https://www.openssl.org/source/license.html>. |