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

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

<h1>SSL_new(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="#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_new - create a new SSL structure for a connection

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> SSL *SSL_new(SSL_CTX *ctx);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_new()</CODE> creates a new <STRONG>SSL</STRONG> structure which is needed to hold the data for a TLS/SSL connection. The
new structure inherits the settings of the underlying context <STRONG>ctx</STRONG>: connection method (SSLv2/v3/TLSv1), options, verification settings,
timeout settings.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
The following return values can occur:

</P>
<DL>
<DT><STRONG><A NAME="item_NULL">NULL</A></STRONG><DD>
<P>
The creation of a new SSL structure failed. Check the error stack to find
out the reason.

</P>
<DT><STRONG><A NAME="item_Pointer">Pointer to an SSL structure</A></STRONG><DD>
<P>
The return value points to an allocated SSL structure.

</P>
</DL>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/SSL_free.html#">SSL_free(3)</A>, <A HREF="../ssl/SSL_clear.html#">SSL_clear(3)</A>,
<A HREF="../ssl/SSL_CTX_set_options.html#">SSL_CTX_set_options(3)</A>,
<A HREF="../ssl/SSL_get_SSL_CTX.html#">SSL_get_SSL_CTX(3)</A>,
<A HREF="../ssl/ssl.html#">ssl(3)</A>



</P>
:}


