summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_CTX_free.3
blob: 9cf59343030f786b2fe24c4e330e76035c90dccd (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
.Dd $Mdocdate: October 12 2014 $
.Dt SSL_CTX_FREE 3
.Os
.Sh NAME
.Nm SSL_CTX_free
.Nd free an allocated SSL_CTX object
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft void
.Fn SSL_CTX_free "SSL_CTX *ctx"
.Sh DESCRIPTION
.Fn SSL_CTX_free
decrements the reference count of
.Fa ctx ,
and removes the
.Vt SSL_CTX
object pointed to by
.Fa ctx
and frees up the allocated memory if the reference count has reached 0.
.Pp
It also calls the
.Xr free 3 Ns ing procedures for indirectly affected items, if applicable:
the session cache, the list of ciphers, the list of Client CAs,
the certificates and keys.
.Sh WARNINGS
If a session-remove callback is set
.Pq Xr SSL_CTX_sess_set_remove_cb 3 ,
this callback will be called for each session being freed from
.Fa ctx Ns 's
session cache.
This implies that all corresponding sessions from an external session cache are
removed as well.
If this is not desired, the user should explicitly unset the callback by
calling
.Fn SSL_CTX_sess_set_remove_cb ctx NULL
prior to calling
.Fn SSL_CTX_free .
.Sh RETURN VALUES
.Fn SSL_CTX_free
does not provide diagnostic information.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_new 3 ,
.Xr SSL_CTX_sess_set_get_cb 3