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