]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/ssl/SSL_get_all_async_fds.pod
Support PKCS v2.0 print in pkcs12 utility.
[thirdparty/openssl.git] / doc / ssl / SSL_get_all_async_fds.pod
CommitLineData
ff75a257
MC
1=pod
2
3=head1 NAME
4
5SSL_waiting_for_async, SSL_get_all_async_fds, SSL_get_changed_async_fds - manage
6asynchronous operations
7
8=head1 SYNOPSIS
9
10 #include <openssl/ssl.h>
11
12 int SSL_waiting_for_async(SSL *s);
13 int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fd, size_t *numfds);
14 int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds,
15 OSSL_ASYNC_FD *delfd, size_t *numdelfds);
16
17=head1 DESCRIPTION
18
19SSL_waiting_for_async() determines whether an SSL connection is currently
20waiting for asynchronous operations to complete (see the SSL_MODE_ASYNC mode in
21L<SSL_CTX_set_mode(3)>).
22
23SSL_get_all_async_fds() returns a list of file descriptor which can be used in a
24call to select() or poll() to determine whether the current asynchronous
25operation has completed or not. A completed operation will result in data
26appearing as "read ready" on the file descriptor (no actual data should be read
27from the file descriptor). This function should only be called if the SSL object
28is currently waiting for asynchronous work to complete (i.e.
29SSL_ERROR_WANT_ASYNC has been received - see L<SSL_get_error(3)>). Typically the
30list will only contain one file descriptor. However if multiple asynchronous
31capable engines are in use then more than one is possible. The number of file
32descriptors returned is stored in B<*numfds> and the file descriptors themselves
33are in B<*fds>. The B<fds> parameter may be NULL in which case no file
34descriptors are returned but B<*numfds> is still populated. It is the callers
35responsibility to ensure sufficient memory is allocated at B<*fds> so typically
36this function is called twice (once with a NULL B<fds> parameter and once
37without).
38
39SSL_get_changed_async_fds() returns a list of the asynchronous file descriptors
40that have been added and a list that have been deleted since the last
41SSL_ERROR_WANT_ASYNC was received (or since the SSL object was created if no
42SSL_ERROR_WANT_ASYNC has been received). Similar to SSL_get_all_async_fds() it
43is the callers responsibility to ensure that B<*addfd> and B<*delfd> have
44sufficient memory allocated, although they may be NULL. The number of added fds
45and the number of deleted fds are stored in B<*numaddfds> and B<*numdelfds>
46respectively.
47
48=head1 RETURN VALUES
49
50SSL_waiting_for_async() will return 1 if the current SSL operation is waiting
51for an async operation to complete and 0 otherwise.
52
53SSL_get_all_async_fds() and SSL_get_changed_async_fds() return 1 on success or
540 on error.
55
56=head1 SEE ALSO
57
58L<SSL_get_error(3)>, L<SSL_CTX_set_mode(3)>
59
60=head1 HISTORY
61
62SSL_waiting_for_async(), SSL_get_all_async_fds() and SSL_get_changed_async_fds()
63were first added to OpenSSL 1.1.0.
64
e2f92610
RS
65=head1 COPYRIGHT
66
67Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
68
69Licensed under the OpenSSL license (the "License"). You may not use
70this file except in compliance with the License. You can obtain a copy
71in the file LICENSE in the source distribution or at
72L<https://www.openssl.org/source/license.html>.
73
74=cut