1.\" $OpenBSD: SSL_num_renegotiations.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $
2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: June 12 2019 $
18.Dt SSL_NUM_RENEGOTIATIONS 3
19.Os
20.Sh NAME
21.Nm SSL_num_renegotiations ,
22.Nm SSL_clear_num_renegotiations ,
23.Nm SSL_total_renegotiations
24.Nd renegotiation counters
25.Sh SYNOPSIS
26.In openssl/ssl.h
27.Ft long
28.Fo SSL_num_renegotiations
29.Fa "SSL *ssl"
30.Fc
31.Ft long
32.Fo SSL_clear_num_renegotiations
33.Fa "SSL *ssl"
34.Fc
35.Ft long
36.Fo SSL_total_renegotiations
37.Fa "SSL *ssl"
38.Fc
39.Sh DESCRIPTION
40.Fn SSL_num_renegotiations
41reports the number of renegotiations initiated in
42.Fa ssl
43since
44.Xr SSL_new 3 ,
45.Xr SSL_clear 3 ,
46or
47.Fn SSL_clear_num_renegotiations
48was last called on that object.
49.Pp
50.Fn SSL_clear_num_renegotiations
51does the same and additionally resets the renegotiation counter to 0.
52.Pp
53.Fn SSL_total_renegotiations
54reports the number of renegotiations initiated in
55.Fa ssl
56since
57.Xr SSL_new 3
58or
59.Xr SSL_clear 3
60was last called on that object.
61.Pp
62These functions are implemented as macros.
63.Sh RETURN VALUES
64All these functions return a number of renegotiations.
65.Sh SEE ALSO
66.Xr BIO_set_ssl_renegotiate_bytes 3 ,
67.Xr ssl 3 ,
68.Xr SSL_ctrl 3 ,
69.Xr SSL_read 3 ,
70.Xr SSL_renegotiate 3 ,
71.Xr SSL_write 3
72.Sh HISTORY
73These functions first appeared in SSLeay 0.9.0
74and have been available since
75.Ox 2.4 .
76