summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_SESSION_free.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_SESSION_free.3')
-rw-r--r--src/lib/libssl/doc/SSL_SESSION_free.379
1 files changed, 0 insertions, 79 deletions
diff --git a/src/lib/libssl/doc/SSL_SESSION_free.3 b/src/lib/libssl/doc/SSL_SESSION_free.3
deleted file mode 100644
index ffd5ae2b29..0000000000
--- a/src/lib/libssl/doc/SSL_SESSION_free.3
+++ /dev/null
@@ -1,79 +0,0 @@
1.\"
2.\" $OpenBSD: SSL_SESSION_free.3,v 1.2 2014/12/02 14:11:01 jmc Exp $
3.\"
4.Dd $Mdocdate: December 2 2014 $
5.Dt SSL_SESSION_FREE 3
6.Os
7.Sh NAME
8.Nm SSL_SESSION_free
9.Nd free an allocated SSL_SESSION structure
10.Sh SYNOPSIS
11.In openssl/ssl.h
12.Ft void
13.Fn SSL_SESSION_free "SSL_SESSION *session"
14.Sh DESCRIPTION
15.Fn SSL_SESSION_free
16decrements the reference count of
17.Fa session
18and removes the
19.Vt SSL_SESSION
20structure pointed to by
21.Fa session
22and frees up the allocated memory, if the reference count has reached 0.
23.Sh NOTES
24.Vt SSL_SESSION
25objects are allocated when a TLS/SSL handshake operation is successfully
26completed.
27Depending on the settings, see
28.Xr SSL_CTX_set_session_cache_mode 3 ,
29the
30.Vt SSL_SESSION
31objects are internally referenced by the
32.Vt SSL_CTX
33and linked into its session cache.
34.Vt SSL
35objects may be using the
36.Vt SSL_SESSION
37object; as a session may be reused, several
38.Vt SSL
39objects may be using one
40.Vt SSL_SESSION
41object at the same time.
42It is therefore crucial to keep the reference count (usage information) correct
43and not delete a
44.Vt SSL_SESSION
45object that is still used, as this may lead to program failures due to dangling
46pointers.
47These failures may also appear delayed, e.g., when an
48.Vt SSL_SESSION
49object is completely freed as the reference count incorrectly becomes 0, but it
50is still referenced in the internal session cache and the cache list is
51processed during a
52.Xr SSL_CTX_flush_sessions 3
53operation.
54.Pp
55.Fn SSL_SESSION_free
56must only be called for
57.Vt SSL_SESSION
58objects, for which the reference count was explicitly incremented (e.g., by
59calling
60.Xr SSL_get1_session 3 ;
61see
62.Xr SSL_get_session 3 )
63or when the
64.Vt SSL_SESSION
65object was generated outside a TLS handshake operation, e.g., by using
66.Xr d2i_SSL_SESSION 3 .
67It must not be called on other
68.Vt SSL_SESSION
69objects, as this would cause incorrect reference counts and therefore program
70failures.
71.Sh RETURN VALUES
72.Fn SSL_SESSION_free
73does not provide diagnostic information.
74.Sh SEE ALSO
75.Xr d2i_SSL_SESSION 3 ,
76.Xr ssl 3 ,
77.Xr SSL_CTX_flush_sessions 3 ,
78.Xr SSL_CTX_set_session_cache_mode 3 ,
79.Xr SSL_get_session 3