|
Packit |
c4476c |
=pod
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 NAME
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_waiting_for_async,
|
|
Packit |
c4476c |
SSL_get_all_async_fds,
|
|
Packit |
c4476c |
SSL_get_changed_async_fds
|
|
Packit |
c4476c |
- manage asynchronous operations
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 SYNOPSIS
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=for comment multiple includes
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
#include <openssl/async.h>
|
|
Packit |
c4476c |
#include <openssl/ssl.h>
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
int SSL_waiting_for_async(SSL *s);
|
|
Packit |
c4476c |
int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fd, size_t *numfds);
|
|
Packit |
c4476c |
int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds,
|
|
Packit |
c4476c |
OSSL_ASYNC_FD *delfd, size_t *numdelfds);
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 DESCRIPTION
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_waiting_for_async() determines whether an SSL connection is currently
|
|
Packit |
c4476c |
waiting for asynchronous operations to complete (see the SSL_MODE_ASYNC mode in
|
|
Packit |
c4476c |
L<SSL_CTX_set_mode(3)>).
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_get_all_async_fds() returns a list of file descriptor which can be used in a
|
|
Packit |
c4476c |
call to select() or poll() to determine whether the current asynchronous
|
|
Packit |
c4476c |
operation has completed or not. A completed operation will result in data
|
|
Packit |
c4476c |
appearing as "read ready" on the file descriptor (no actual data should be read
|
|
Packit |
c4476c |
from the file descriptor). This function should only be called if the SSL object
|
|
Packit |
c4476c |
is currently waiting for asynchronous work to complete (i.e.
|
|
Packit |
c4476c |
SSL_ERROR_WANT_ASYNC has been received - see L<SSL_get_error(3)>). Typically the
|
|
Packit |
c4476c |
list will only contain one file descriptor. However if multiple asynchronous
|
|
Packit |
c4476c |
capable engines are in use then more than one is possible. The number of file
|
|
Packit |
c4476c |
descriptors returned is stored in B<*numfds> and the file descriptors themselves
|
|
Packit |
c4476c |
are in B<*fds>. The B<fds> parameter may be NULL in which case no file
|
|
Packit |
c4476c |
descriptors are returned but B<*numfds> is still populated. It is the callers
|
|
Packit |
c4476c |
responsibility to ensure sufficient memory is allocated at B<*fds> so typically
|
|
Packit |
c4476c |
this function is called twice (once with a NULL B<fds> parameter and once
|
|
Packit |
c4476c |
without).
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_get_changed_async_fds() returns a list of the asynchronous file descriptors
|
|
Packit |
c4476c |
that have been added and a list that have been deleted since the last
|
|
Packit |
c4476c |
SSL_ERROR_WANT_ASYNC was received (or since the SSL object was created if no
|
|
Packit |
c4476c |
SSL_ERROR_WANT_ASYNC has been received). Similar to SSL_get_all_async_fds() it
|
|
Packit |
c4476c |
is the callers responsibility to ensure that B<*addfd> and B<*delfd> have
|
|
Packit |
c4476c |
sufficient memory allocated, although they may be NULL. The number of added fds
|
|
Packit |
c4476c |
and the number of deleted fds are stored in B<*numaddfds> and B<*numdelfds>
|
|
Packit |
c4476c |
respectively.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 RETURN VALUES
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_waiting_for_async() will return 1 if the current SSL operation is waiting
|
|
Packit |
c4476c |
for an async operation to complete and 0 otherwise.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
SSL_get_all_async_fds() and SSL_get_changed_async_fds() return 1 on success or
|
|
Packit |
c4476c |
0 on error.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 NOTES
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
On Windows platforms the openssl/async.h header is dependent on some
|
|
Packit |
c4476c |
of the types customarily made available by including windows.h. The
|
|
Packit |
c4476c |
application developer is likely to require control over when the latter
|
|
Packit |
c4476c |
is included, commonly as one of the first included headers. Therefore
|
|
Packit |
c4476c |
it is defined as an application developer's responsibility to include
|
|
Packit |
c4476c |
windows.h prior to async.h.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 SEE ALSO
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
L<SSL_get_error(3)>, L<SSL_CTX_set_mode(3)>
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 HISTORY
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
The SSL_waiting_for_async(), SSL_get_all_async_fds()
|
|
Packit |
c4476c |
and SSL_get_changed_async_fds() functions were added in OpenSSL 1.1.0.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=head1 COPYRIGHT
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
Licensed under the OpenSSL license (the "License"). You may not use
|
|
Packit |
c4476c |
this file except in compliance with the License. You can obtain a copy
|
|
Packit |
c4476c |
in the file LICENSE in the source distribution or at
|
|
Packit |
c4476c |
L<https://www.openssl.org/source/license.html>.
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
=cut
|