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