]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/SSL_CTX_free.pod
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
[thirdparty/openssl.git] / doc / man3 / SSL_CTX_free.pod
CommitLineData
4759abc5
RL
1=pod
2
3=head1 NAME
4
5SSL_CTX_free - free an allocated SSL_CTX object
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 void SSL_CTX_free(SSL_CTX *ctx);
12
13=head1 DESCRIPTION
14
15SSL_CTX_free() decrements the reference count of B<ctx>, and removes the
b9b6a7e5 16SSL_CTX object pointed to by B<ctx> and frees up the allocated memory if the reference count has reached 0.
4759abc5
RL
17
18It also calls the free()ing procedures for indirectly affected items, if
52d160d8 19applicable: the session cache, the list of ciphers, the list of Client CAs,
4759abc5
RL
20the certificates and keys.
21
62adbcee
RS
22If B<ctx> is NULL nothing is done.
23
423b1a84
LJ
24=head1 WARNINGS
25
26If a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this
27callback will be called for each session being freed from B<ctx>'s
28session cache. This implies, that all corresponding sessions from an
29external session cache are removed as well. If this is not desired, the user
30should explicitly unset the callback by calling
31SSL_CTX_sess_set_remove_cb(B<ctx>, NULL) prior to calling SSL_CTX_free().
32
4759abc5
RL
33=head1 RETURN VALUES
34
35SSL_CTX_free() does not provide diagnostic information.
36
d300bcca
LJ
37=head1 SEE ALSO
38
b97fdb57 39L<SSL_CTX_new(3)>, L<ssl(7)>,
9b86974e 40L<SSL_CTX_sess_set_get_cb(3)>
4759abc5 41
e2f92610
RS
42=head1 COPYRIGHT
43
44Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
45
4746f25a 46Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
47this file except in compliance with the License. You can obtain a copy
48in the file LICENSE in the source distribution or at
49L<https://www.openssl.org/source/license.html>.
50
51=cut