
#use wml::openssl-macros area=docs page=SSL_CTX_free

<title>Documents, SSL_CTX_free(3)</title>

<h1>SSL_CTX_free(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#WARNINGS">WARNINGS</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
SSL_CTX_free - free an allocated SSL_CTX object

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> void SSL_CTX_free(SSL_CTX *ctx);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_CTX_free()</CODE> decrements the reference count of <STRONG>ctx</STRONG>, and removes the SSL_CTX object pointed to by <STRONG>ctx</STRONG> and frees up the allocated memory if the the reference count has reached 0.

</P>
<P>
It also calls the <CODE>free()ing</CODE> procedures for indirectly affected
items, if applicable: the session cache, the list of ciphers, the list of
Client CAs, the certificates and keys.

</P>
<P>
<HR>
<H1><A NAME="WARNINGS">WARNINGS</A></H1>
<P>
If a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this
callback will be called for each session being freed from <STRONG>ctx</STRONG>'s session cache. This implies, that all corresponding sessions from an
external session cache are removed as well. If this is not desired, the
user should explicitly unset the callback by calling
<CODE>SSL_CTX_sess_set_remove_cb(</CODE><STRONG>ctx</STRONG>, NULL) prior to calling <CODE>SSL_CTX_free().</CODE>

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
<CODE>SSL_CTX_free()</CODE> does not provide diagnostic information.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/SSL_CTX_new.html#">SSL_CTX_new(3)</A>, <A HREF="../ssl/ssl.html#">ssl(3)</A>,
<A HREF="../ssl/SSL_CTX_sess_set_get_cb.html#">SSL_CTX_sess_set_get_cb(3)</A>



</P>
:}

