1SSL_GET_ALL_ASYNC_FDS(3)            OpenSSL           SSL_GET_ALL_ASYNC_FDS(3)
2
3
4

NAME

6       SSL_waiting_for_async, SSL_get_all_async_fds, SSL_get_changed_async_fds
7       - manage asynchronous operations
8

SYNOPSIS

10        #include <openssl/async.h>
11        #include <openssl/ssl.h>
12
13        int SSL_waiting_for_async(SSL *s);
14        int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fd, size_t *numfds);
15        int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds,
16                                      OSSL_ASYNC_FD *delfd, size_t *numdelfds);
17

DESCRIPTION

19       SSL_waiting_for_async() determines whether an SSL connection is
20       currently waiting for asynchronous operations to complete (see the
21       SSL_MODE_ASYNC mode in SSL_CTX_set_mode(3)).
22
23       SSL_get_all_async_fds() returns a list of file descriptor which can be
24       used in a call to select() or poll() to determine whether the current
25       asynchronous operation has completed or not. A completed operation will
26       result in data appearing as "read ready" on the file descriptor (no
27       actual data should be read from the file descriptor). This function
28       should only be called if the SSL object is currently waiting for
29       asynchronous work to complete (i.e.  SSL_ERROR_WANT_ASYNC has been
30       received - see SSL_get_error(3)). Typically the list will only contain
31       one file descriptor. However if multiple asynchronous capable engines
32       are in use then more than one is possible. The number of file
33       descriptors returned is stored in *numfds and the file descriptors
34       themselves are in *fds. The fds parameter may be NULL in which case no
35       file descriptors are returned but *numfds is still populated. It is the
36       callers responsibility to ensure sufficient memory is allocated at *fds
37       so typically this function is called twice (once with a NULL fds
38       parameter and once without).
39
40       SSL_get_changed_async_fds() returns a list of the asynchronous file
41       descriptors that have been added and a list that have been deleted
42       since the last SSL_ERROR_WANT_ASYNC was received (or since the SSL
43       object was created if no SSL_ERROR_WANT_ASYNC has been received).
44       Similar to SSL_get_all_async_fds() it is the callers responsibility to
45       ensure that *addfd and *delfd have sufficient memory allocated,
46       although they may be NULL. The number of added fds and the number of
47       deleted fds are stored in *numaddfds and *numdelfds respectively.
48

RETURN VALUES

50       SSL_waiting_for_async() will return 1 if the current SSL operation is
51       waiting for an async operation to complete and 0 otherwise.
52
53       SSL_get_all_async_fds() and SSL_get_changed_async_fds() return 1 on
54       success or 0 on error.
55

NOTES

57       On Windows platforms the openssl/async.h header is dependent on some of
58       the types customarily made available by including windows.h. The
59       application developer is likely to require control over when the latter
60       is included, commonly as one of the first included headers. Therefore
61       it is defined as an application developer's responsibility to include
62       windows.h prior to async.h.
63

SEE ALSO

65       SSL_get_error(3), SSL_CTX_set_mode(3)
66

HISTORY

68       The SSL_waiting_for_async(), SSL_get_all_async_fds() and
69       SSL_get_changed_async_fds() functions were added in OpenSSL 1.1.0.
70
72       Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
73
74       Licensed under the OpenSSL license (the "License").  You may not use
75       this file except in compliance with the License.  You can obtain a copy
76       in the file LICENSE in the source distribution or at
77       <https://www.openssl.org/source/license.html>.
78
79
80
811.1.1d                            2019-10-03          SSL_GET_ALL_ASYNC_FDS(3)
Impressum