openssl/doc/man3/SSL_get_tick_timeout.pod
Hugo Landau 8ccc567ef0 QUIC CSM: Tweak docs for tick functions, add DTLSv1 docs
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
2023-01-13 13:20:36 +00:00

64 lines
2.0 KiB
Plaintext

=pod
=head1 NAME
SSL_get_tick_timeout - determine when an SSL object next needs to be ticked
=head1 SYNOPSIS
#include <openssl/ssl.h>
int SSL_get_tick_timeout(SSL *s, struct timeval *tv);
=head1 DESCRIPTION
SSL_get_tick_timeout() determines when the SSL object next needs to perform
internal processing due to the passage of time.
Calling SSL_get_tick_timeout() results in I<*tv> being written with an amount of
time left before the SSL object needs to be ticked. If the SSL object needs to
be ticked immediately, it is set to zero; if the SSL object currently does not
need to be ticked at any point in the future, I<tv->tv_sec> is set to -1,
representing infinity.
This function is currently applicable only to DTLS and QUIC connection SSL
objects. If it is called on any other kind of SSL object, it always outputs
infinity. This is considered a success condition.
For DTLS, this function can be used instead of the older
L<DTLSv1_get_timeout(3)> function. Note that this function differs from
L<DTLSv1_get_timeout(3)> in that the case where no timeout is active is
considered a success condition.
Note that the value output by a call to SSL_get_tick_timeout() may change as a
result of other calls to the SSL object.
Once the timeout expires, SSL_tick() should be called to handle any internal
processing which is due; for more information, see L<SSL_tick(3)>.
Note that SSL_get_tick_timeout() supersedes the older L<DTLSv1_get_timeout(3)>
function for all use cases.
=head1 RETURN VALUES
Returns 1 on success and 0 on failure.
=head1 SEE ALSO
L<SSL_tick(3)>, L<DTLSv1_get_timeout(3)>, L<ssl(7)>
=head1 HISTORY
The SSL_get_tick_timeout() function was added in OpenSSL 3.2.
=head1 COPYRIGHT
Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.
=cut