summaryrefslogtreecommitdiff
path: root/doc/man3/SSL_get_tick_timeout.pod
blob: 8decc35a628887878f8da903263bbf982a91f102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
=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