1*7a73e666Sschwarze.\"	$OpenBSD: SSL_CTX_sess_number.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $
2afce0fe4Sschwarze.\"	OpenSSL SSL_CTX_sess_number.pod 7bd27895 Mar 29 11:45:29 2017 +1000
3f1a3c524Sschwarze.\"
4f075b83dSschwarze.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5f075b83dSschwarze.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
6f1a3c524Sschwarze.\"
7f075b83dSschwarze.\" Redistribution and use in source and binary forms, with or without
8f075b83dSschwarze.\" modification, are permitted provided that the following conditions
9f075b83dSschwarze.\" are met:
10f075b83dSschwarze.\"
11f075b83dSschwarze.\" 1. Redistributions of source code must retain the above copyright
12f075b83dSschwarze.\"    notice, this list of conditions and the following disclaimer.
13f075b83dSschwarze.\"
14f075b83dSschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
15f075b83dSschwarze.\"    notice, this list of conditions and the following disclaimer in
16f075b83dSschwarze.\"    the documentation and/or other materials provided with the
17f075b83dSschwarze.\"    distribution.
18f075b83dSschwarze.\"
19f075b83dSschwarze.\" 3. All advertising materials mentioning features or use of this
20f075b83dSschwarze.\"    software must display the following acknowledgment:
21f075b83dSschwarze.\"    "This product includes software developed by the OpenSSL Project
22f075b83dSschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23f075b83dSschwarze.\"
24f075b83dSschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25f075b83dSschwarze.\"    endorse or promote products derived from this software without
26f075b83dSschwarze.\"    prior written permission. For written permission, please contact
27f075b83dSschwarze.\"    openssl-core@openssl.org.
28f075b83dSschwarze.\"
29f075b83dSschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
30f075b83dSschwarze.\"    nor may "OpenSSL" appear in their names without prior written
31f075b83dSschwarze.\"    permission of the OpenSSL Project.
32f075b83dSschwarze.\"
33f075b83dSschwarze.\" 6. Redistributions of any form whatsoever must retain the following
34f075b83dSschwarze.\"    acknowledgment:
35f075b83dSschwarze.\"    "This product includes software developed by the OpenSSL Project
36f075b83dSschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37f075b83dSschwarze.\"
38f075b83dSschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39f075b83dSschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40f075b83dSschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41f075b83dSschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
42f075b83dSschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43f075b83dSschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44f075b83dSschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45f075b83dSschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46f075b83dSschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47f075b83dSschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48f075b83dSschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49f075b83dSschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50f075b83dSschwarze.\"
51*7a73e666Sschwarze.Dd $Mdocdate: June 12 2019 $
52f1a3c524Sschwarze.Dt SSL_CTX_SESS_NUMBER 3
53f1a3c524Sschwarze.Os
54f1a3c524Sschwarze.Sh NAME
55f1a3c524Sschwarze.Nm SSL_CTX_sess_number ,
56f1a3c524Sschwarze.Nm SSL_CTX_sess_connect ,
57f1a3c524Sschwarze.Nm SSL_CTX_sess_connect_good ,
58f1a3c524Sschwarze.Nm SSL_CTX_sess_connect_renegotiate ,
59f1a3c524Sschwarze.Nm SSL_CTX_sess_accept ,
60f1a3c524Sschwarze.Nm SSL_CTX_sess_accept_good ,
61f1a3c524Sschwarze.Nm SSL_CTX_sess_accept_renegotiate ,
62f1a3c524Sschwarze.Nm SSL_CTX_sess_hits ,
63f1a3c524Sschwarze.Nm SSL_CTX_sess_cb_hits ,
64f1a3c524Sschwarze.Nm SSL_CTX_sess_misses ,
65f1a3c524Sschwarze.Nm SSL_CTX_sess_timeouts ,
66f1a3c524Sschwarze.Nm SSL_CTX_sess_cache_full
67f1a3c524Sschwarze.Nd obtain session cache statistics
68f1a3c524Sschwarze.Sh SYNOPSIS
69f1a3c524Sschwarze.In openssl/ssl.h
70f1a3c524Sschwarze.Ft long
71f1a3c524Sschwarze.Fn SSL_CTX_sess_number "SSL_CTX *ctx"
72f1a3c524Sschwarze.Ft long
73f1a3c524Sschwarze.Fn SSL_CTX_sess_connect "SSL_CTX *ctx"
74f1a3c524Sschwarze.Ft long
75f1a3c524Sschwarze.Fn SSL_CTX_sess_connect_good "SSL_CTX *ctx"
76f1a3c524Sschwarze.Ft long
77f1a3c524Sschwarze.Fn SSL_CTX_sess_connect_renegotiate "SSL_CTX *ctx"
78f1a3c524Sschwarze.Ft long
79f1a3c524Sschwarze.Fn SSL_CTX_sess_accept "SSL_CTX *ctx"
80f1a3c524Sschwarze.Ft long
81f1a3c524Sschwarze.Fn SSL_CTX_sess_accept_good "SSL_CTX *ctx"
82f1a3c524Sschwarze.Ft long
83f1a3c524Sschwarze.Fn SSL_CTX_sess_accept_renegotiate "SSL_CTX *ctx"
84f1a3c524Sschwarze.Ft long
85f1a3c524Sschwarze.Fn SSL_CTX_sess_hits "SSL_CTX *ctx"
86f1a3c524Sschwarze.Ft long
87f1a3c524Sschwarze.Fn SSL_CTX_sess_cb_hits "SSL_CTX *ctx"
88f1a3c524Sschwarze.Ft long
89f1a3c524Sschwarze.Fn SSL_CTX_sess_misses "SSL_CTX *ctx"
90f1a3c524Sschwarze.Ft long
91f1a3c524Sschwarze.Fn SSL_CTX_sess_timeouts "SSL_CTX *ctx"
92f1a3c524Sschwarze.Ft long
93f1a3c524Sschwarze.Fn SSL_CTX_sess_cache_full "SSL_CTX *ctx"
94f1a3c524Sschwarze.Sh DESCRIPTION
95f1a3c524Sschwarze.Fn SSL_CTX_sess_number
96f1a3c524Sschwarzereturns the current number of sessions in the internal session cache.
97f1a3c524Sschwarze.Pp
98f1a3c524Sschwarze.Fn SSL_CTX_sess_connect
99f1a3c524Sschwarzereturns the number of started SSL/TLS handshakes in client mode.
100f1a3c524Sschwarze.Pp
101f1a3c524Sschwarze.Fn SSL_CTX_sess_connect_good
102f1a3c524Sschwarzereturns the number of successfully established SSL/TLS sessions in client mode.
103f1a3c524Sschwarze.Pp
104f1a3c524Sschwarze.Fn SSL_CTX_sess_connect_renegotiate
105afce0fe4Sschwarzereturns the number of started renegotiations in client mode.
106f1a3c524Sschwarze.Pp
107f1a3c524Sschwarze.Fn SSL_CTX_sess_accept
108f1a3c524Sschwarzereturns the number of started SSL/TLS handshakes in server mode.
109f1a3c524Sschwarze.Pp
110f1a3c524Sschwarze.Fn SSL_CTX_sess_accept_good
111f1a3c524Sschwarzereturns the number of successfully established SSL/TLS sessions in server mode.
112f1a3c524Sschwarze.Pp
113f1a3c524Sschwarze.Fn SSL_CTX_sess_accept_renegotiate
114afce0fe4Sschwarzereturns the number of started renegotiations in server mode.
115f1a3c524Sschwarze.Pp
116f1a3c524Sschwarze.Fn SSL_CTX_sess_hits
117f1a3c524Sschwarzereturns the number of successfully reused sessions.
118f1a3c524SschwarzeIn client mode a session set with
119f1a3c524Sschwarze.Xr SSL_set_session 3
120f1a3c524Sschwarzesuccessfully reused is counted as a hit.
121f1a3c524SschwarzeIn server mode a session successfully retrieved from internal or external cache
122f1a3c524Sschwarzeis counted as a hit.
123f1a3c524Sschwarze.Pp
124f1a3c524Sschwarze.Fn SSL_CTX_sess_cb_hits
125f1a3c524Sschwarzereturns the number of successfully retrieved sessions from the external session
126f1a3c524Sschwarzecache in server mode.
127f1a3c524Sschwarze.Pp
128f1a3c524Sschwarze.Fn SSL_CTX_sess_misses
129f1a3c524Sschwarzereturns the number of sessions proposed by clients that were not found in the
130f1a3c524Sschwarzeinternal session cache in server mode.
131f1a3c524Sschwarze.Pp
132f1a3c524Sschwarze.Fn SSL_CTX_sess_timeouts
133f1a3c524Sschwarzereturns the number of sessions proposed by clients and either found in the
134f1a3c524Sschwarzeinternal or external session cache in server mode,
135f1a3c524Sschwarzebut that were invalid due to timeout.
136f1a3c524SschwarzeThese sessions are not included in the
137f1a3c524Sschwarze.Fn SSL_CTX_sess_hits
138f1a3c524Sschwarzecount.
139f1a3c524Sschwarze.Pp
140f1a3c524Sschwarze.Fn SSL_CTX_sess_cache_full
141f1a3c524Sschwarzereturns the number of sessions that were removed because the maximum session
142f1a3c524Sschwarzecache size was exceeded.
143f1a3c524Sschwarze.Sh SEE ALSO
144*7a73e666Sschwarze.Xr ssl 3 ,
145bb2ba699Sschwarze.Xr SSL_CTX_ctrl 3 ,
146f1a3c524Sschwarze.Xr SSL_CTX_sess_set_cache_size 3 ,
147f1a3c524Sschwarze.Xr SSL_CTX_set_session_cache_mode 3 ,
148f1a3c524Sschwarze.Xr SSL_set_session 3
1498fba1ec8Sschwarze.Sh HISTORY
15020b9f7f9Sschwarze.Fn SSL_CTX_sess_number ,
1518fba1ec8Sschwarze.Fn SSL_CTX_sess_connect ,
1528fba1ec8Sschwarze.Fn SSL_CTX_sess_connect_good ,
1538fba1ec8Sschwarze.Fn SSL_CTX_sess_accept ,
1548fba1ec8Sschwarze.Fn SSL_CTX_sess_accept_good ,
1558fba1ec8Sschwarze.Fn SSL_CTX_sess_hits ,
1568fba1ec8Sschwarze.Fn SSL_CTX_sess_misses ,
1578fba1ec8Sschwarzeand
1588fba1ec8Sschwarze.Fn SSL_CTX_sess_timeouts
15910e00d17Sschwarzefirst appeared in SSLeay 0.5.2.
16010e00d17Sschwarze.Fn SSL_CTX_sess_cb_hits
16110e00d17Sschwarzefirst appeared in SSLeay 0.6.0.
16289e35aa1Sschwarze.Fn SSL_CTX_sess_connect_renegotiate ,
16389e35aa1Sschwarze.Fn SSL_CTX_sess_accept_renegotiate ,
16489e35aa1Sschwarzeand
16589e35aa1Sschwarze.Fn SSL_CTX_sess_cache_full
16689e35aa1Sschwarzefirst appeared in SSLeay 0.9.0.
16789e35aa1SschwarzeAll these functions have been available since
1688fba1ec8Sschwarze.Ox 2.4 .
169