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.384
1 files changed, 0 insertions, 84 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 69491f714b..0000000000
--- a/src/lib/libssl/doc/SSL_SESSION_free.3
+++ /dev/null
@@ -1,84 +0,0 @@
1.\"
2.\" $OpenBSD: SSL_SESSION_free.3,v 1.3 2015/12/30 18:45:02 millert Exp $
3.\"
4.Dd $Mdocdate: December 30 2015 $
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.
23If
24.Fa session
25is a
26.Dv NULL
27pointer, no action occurs.
28.Sh NOTES
29.Vt SSL_SESSION
30objects are allocated when a TLS/SSL handshake operation is successfully
31completed.
32Depending on the settings, see
33.Xr SSL_CTX_set_session_cache_mode 3 ,
34the
35.Vt SSL_SESSION
36objects are internally referenced by the
37.Vt SSL_CTX
38and linked into its session cache.
39.Vt SSL
40objects may be using the
41.Vt SSL_SESSION
42object; as a session may be reused, several
43.Vt SSL
44objects may be using one
45.Vt SSL_SESSION
46object at the same time.
47It is therefore crucial to keep the reference count (usage information) correct
48and not delete a
49.Vt SSL_SESSION
50object that is still used, as this may lead to program failures due to dangling
51pointers.
52These failures may also appear delayed, e.g., when an
53.Vt SSL_SESSION
54object is completely freed as the reference count incorrectly becomes 0, but it
55is still referenced in the internal session cache and the cache list is
56processed during a
57.Xr SSL_CTX_flush_sessions 3
58operation.
59.Pp
60.Fn SSL_SESSION_free
61must only be called for
62.Vt SSL_SESSION
63objects, for which the reference count was explicitly incremented (e.g., by
64calling
65.Xr SSL_get1_session 3 ;
66see
67.Xr SSL_get_session 3 )
68or when the
69.Vt SSL_SESSION
70object was generated outside a TLS handshake operation, e.g., by using
71.Xr d2i_SSL_SESSION 3 .
72It must not be called on other
73.Vt SSL_SESSION
74objects, as this would cause incorrect reference counts and therefore program
75failures.
76.Sh RETURN VALUES
77.Fn SSL_SESSION_free
78does not provide diagnostic information.
79.Sh SEE ALSO
80.Xr d2i_SSL_SESSION 3 ,
81.Xr ssl 3 ,
82.Xr SSL_CTX_flush_sessions 3 ,
83.Xr SSL_CTX_set_session_cache_mode 3 ,
84.Xr SSL_get_session 3