1*ebfedea0SLionel Sambuc=pod 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambuc=head1 NAME 4*ebfedea0SLionel Sambuc 5*ebfedea0SLionel SambucSSL_CTX_free - free an allocated SSL_CTX object 6*ebfedea0SLionel Sambuc 7*ebfedea0SLionel Sambuc=head1 SYNOPSIS 8*ebfedea0SLionel Sambuc 9*ebfedea0SLionel Sambuc #include <openssl/ssl.h> 10*ebfedea0SLionel Sambuc 11*ebfedea0SLionel Sambuc void SSL_CTX_free(SSL_CTX *ctx); 12*ebfedea0SLionel Sambuc 13*ebfedea0SLionel Sambuc=head1 DESCRIPTION 14*ebfedea0SLionel Sambuc 15*ebfedea0SLionel SambucSSL_CTX_free() decrements the reference count of B<ctx>, and removes the 16*ebfedea0SLionel SambucSSL_CTX object pointed to by B<ctx> and frees up the allocated memory if the 17*ebfedea0SLionel Sambucthe reference count has reached 0. 18*ebfedea0SLionel Sambuc 19*ebfedea0SLionel SambucIt also calls the free()ing procedures for indirectly affected items, if 20*ebfedea0SLionel Sambucapplicable: the session cache, the list of ciphers, the list of Client CAs, 21*ebfedea0SLionel Sambucthe certificates and keys. 22*ebfedea0SLionel Sambuc 23*ebfedea0SLionel Sambuc=head1 WARNINGS 24*ebfedea0SLionel Sambuc 25*ebfedea0SLionel SambucIf a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this 26*ebfedea0SLionel Sambuccallback will be called for each session being freed from B<ctx>'s 27*ebfedea0SLionel Sambucsession cache. This implies, that all corresponding sessions from an 28*ebfedea0SLionel Sambucexternal session cache are removed as well. If this is not desired, the user 29*ebfedea0SLionel Sambucshould explicitly unset the callback by calling 30*ebfedea0SLionel SambucSSL_CTX_sess_set_remove_cb(B<ctx>, NULL) prior to calling SSL_CTX_free(). 31*ebfedea0SLionel Sambuc 32*ebfedea0SLionel Sambuc=head1 RETURN VALUES 33*ebfedea0SLionel Sambuc 34*ebfedea0SLionel SambucSSL_CTX_free() does not provide diagnostic information. 35*ebfedea0SLionel Sambuc 36*ebfedea0SLionel Sambuc=head1 SEE ALSO 37*ebfedea0SLionel Sambuc 38*ebfedea0SLionel SambucL<SSL_CTX_new(3)|SSL_CTX_new(3)>, L<ssl(3)|ssl(3)>, 39*ebfedea0SLionel SambucL<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)> 40*ebfedea0SLionel Sambuc 41*ebfedea0SLionel Sambuc=cut 42