xref: /freebsd/crypto/openssl/doc/man3/SSL_CTX_free.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimSSL_CTX_free - free an allocated SSL_CTX object
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/ssl.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim void SSL_CTX_free(SSL_CTX *ctx);
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim=head1 DESCRIPTION
14e71b7053SJung-uk Kim
15e71b7053SJung-uk KimSSL_CTX_free() decrements the reference count of B<ctx>, and removes the
16e71b7053SJung-uk KimSSL_CTX object pointed to by B<ctx> and frees up the allocated memory if the reference count has reached 0.
17e71b7053SJung-uk Kim
18e71b7053SJung-uk KimIt also calls the free()ing procedures for indirectly affected items, if
19e71b7053SJung-uk Kimapplicable: the session cache, the list of ciphers, the list of Client CAs,
20e71b7053SJung-uk Kimthe certificates and keys.
21e71b7053SJung-uk Kim
22e71b7053SJung-uk KimIf B<ctx> is NULL nothing is done.
23e71b7053SJung-uk Kim
24e71b7053SJung-uk Kim=head1 WARNINGS
25e71b7053SJung-uk Kim
26e71b7053SJung-uk KimIf a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this
27e71b7053SJung-uk Kimcallback will be called for each session being freed from B<ctx>'s
28e71b7053SJung-uk Kimsession cache. This implies, that all corresponding sessions from an
29e71b7053SJung-uk Kimexternal session cache are removed as well. If this is not desired, the user
30e71b7053SJung-uk Kimshould explicitly unset the callback by calling
31e71b7053SJung-uk KimSSL_CTX_sess_set_remove_cb(B<ctx>, NULL) prior to calling SSL_CTX_free().
32e71b7053SJung-uk Kim
33e71b7053SJung-uk Kim=head1 RETURN VALUES
34e71b7053SJung-uk Kim
35e71b7053SJung-uk KimSSL_CTX_free() does not provide diagnostic information.
36e71b7053SJung-uk Kim
37e71b7053SJung-uk Kim=head1 SEE ALSO
38e71b7053SJung-uk Kim
39e71b7053SJung-uk KimL<SSL_CTX_new(3)>, L<ssl(7)>,
40e71b7053SJung-uk KimL<SSL_CTX_sess_set_get_cb(3)>
41e71b7053SJung-uk Kim
42e71b7053SJung-uk Kim=head1 COPYRIGHT
43e71b7053SJung-uk Kim
44e71b7053SJung-uk KimCopyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
45e71b7053SJung-uk Kim
46*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
47e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
48e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
49e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
50e71b7053SJung-uk Kim
51e71b7053SJung-uk Kim=cut
52