<refentry id="camel-CamelTcpStreamSSL">
<refmeta>
<refentrytitle role="top_of_page" id="camel-CamelTcpStreamSSL.top_of_page">CamelTcpStreamSSL</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>CamelTcpStreamSSL</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="camel-CamelTcpStreamSSL.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
struct              <link linkend="CamelTcpStreamSSL">CamelTcpStreamSSL</link>;
#define             <link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL2:CAPS">CAMEL_TCP_STREAM_SSL_ENABLE_SSL2</link>
#define             <link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL3:CAPS">CAMEL_TCP_STREAM_SSL_ENABLE_SSL3</link>
#define             <link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-TLS:CAPS">CAMEL_TCP_STREAM_SSL_ENABLE_TLS</link>
<link linkend="CamelStream">CamelStream</link>*        <link linkend="camel-tcp-stream-ssl-new">camel_tcp_stream_ssl_new</link>            (<link linkend="struct--CamelSession">struct _CamelSession</link> *session,
                                                         const <link linkend="char">char</link> *expected_host,
                                                         <link linkend="guint32">guint32</link> flags);
<link linkend="CamelStream">CamelStream</link>*        <link linkend="camel-tcp-stream-ssl-new-raw">camel_tcp_stream_ssl_new_raw</link>        (<link linkend="struct--CamelSession">struct _CamelSession</link> *session,
                                                         const <link linkend="char">char</link> *expected_host,
                                                         <link linkend="guint32">guint32</link> flags);
<link linkend="int">int</link>                 <link linkend="camel-tcp-stream-ssl-enable-ssl">camel_tcp_stream_ssl_enable_ssl</link>     (<link linkend="CamelTcpStreamSSL">CamelTcpStreamSSL</link> *ssl);
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-CamelTcpStreamSSL.description" role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="camel-CamelTcpStreamSSL.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelTcpStreamSSL" role="struct">
<title>struct CamelTcpStreamSSL</title>
<indexterm zone="CamelTcpStreamSSL"><primary>CamelTcpStreamSSL</primary></indexterm><programlisting>struct CamelTcpStreamSSL {
	CamelTcpStream parent_object;
	
	struct _CamelTcpStreamSSLPrivate *priv;
};
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CAMEL-TCP-STREAM-SSL-ENABLE-SSL2:CAPS" role="macro">
<title>CAMEL_TCP_STREAM_SSL_ENABLE_SSL2</title>
<indexterm zone="CAMEL-TCP-STREAM-SSL-ENABLE-SSL2:CAPS"><primary>CAMEL_TCP_STREAM_SSL_ENABLE_SSL2</primary></indexterm><programlisting>#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL2   (1 &lt;&lt; 0)
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CAMEL-TCP-STREAM-SSL-ENABLE-SSL3:CAPS" role="macro">
<title>CAMEL_TCP_STREAM_SSL_ENABLE_SSL3</title>
<indexterm zone="CAMEL-TCP-STREAM-SSL-ENABLE-SSL3:CAPS"><primary>CAMEL_TCP_STREAM_SSL_ENABLE_SSL3</primary></indexterm><programlisting>#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL3   (1 &lt;&lt; 1)
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CAMEL-TCP-STREAM-SSL-ENABLE-TLS:CAPS" role="macro">
<title>CAMEL_TCP_STREAM_SSL_ENABLE_TLS</title>
<indexterm zone="CAMEL-TCP-STREAM-SSL-ENABLE-TLS:CAPS"><primary>CAMEL_TCP_STREAM_SSL_ENABLE_TLS</primary></indexterm><programlisting>#define CAMEL_TCP_STREAM_SSL_ENABLE_TLS    (1 &lt;&lt; 2)
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-tcp-stream-ssl-new" role="function">
<title>camel_tcp_stream_ssl_new ()</title>
<indexterm zone="camel-tcp-stream-ssl-new"><primary>camel_tcp_stream_ssl_new</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link>*        camel_tcp_stream_ssl_new            (<link linkend="struct--CamelSession">struct _CamelSession</link> *session,
                                                         const <link linkend="char">char</link> *expected_host,
                                                         <link linkend="guint32">guint32</link> flags);</programlisting>
<para>
Since the SSL certificate authenticator may need to prompt the
user, a <link linkend="CamelSession"><type>CamelSession</type></link> is needed. <parameter>expected_host</parameter> is needed as a
protection against an MITM attack.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>session</parameter>&nbsp;:</term>
<listitem><simpara> an active <link linkend="CamelSession"><type>CamelSession</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expected_host</parameter>&nbsp;:</term>
<listitem><simpara> host that the stream is expected to connect with
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> a bitwise combination of any of
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL2:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_SSL2</type></link>,
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL3:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_SSL3</type></link> or
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-TLS:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_TLS</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a new <link linkend="CamelTcpStreamSSL"><type>CamelTcpStreamSSL</type></link> stream preset in SSL mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-tcp-stream-ssl-new-raw" role="function">
<title>camel_tcp_stream_ssl_new_raw ()</title>
<indexterm zone="camel-tcp-stream-ssl-new-raw"><primary>camel_tcp_stream_ssl_new_raw</primary></indexterm><programlisting><link linkend="CamelStream">CamelStream</link>*        camel_tcp_stream_ssl_new_raw        (<link linkend="struct--CamelSession">struct _CamelSession</link> *session,
                                                         const <link linkend="char">char</link> *expected_host,
                                                         <link linkend="guint32">guint32</link> flags);</programlisting>
<para>
Since the SSL certificate authenticator may need to prompt the
user, a CamelSession is needed. <parameter>expected_host</parameter> is needed as a
protection against an MITM attack.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>session</parameter>&nbsp;:</term>
<listitem><simpara> an active <link linkend="CamelSession"><type>CamelSession</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expected_host</parameter>&nbsp;:</term>
<listitem><simpara> host that the stream is expected to connect with
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> a bitwise combination of any of
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL2:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_SSL2</type></link>,
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-SSL3:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_SSL3</type></link> or
<link linkend="CAMEL-TCP-STREAM-SSL-ENABLE-TLS:CAPS"><type>CAMEL_TCP_STREAM_SSL_ENABLE_TLS</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a new <link linkend="CamelTcpStreamSSL"><type>CamelTcpStreamSSL</type></link> stream not yet toggled into SSL mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-tcp-stream-ssl-enable-ssl" role="function">
<title>camel_tcp_stream_ssl_enable_ssl ()</title>
<indexterm zone="camel-tcp-stream-ssl-enable-ssl"><primary>camel_tcp_stream_ssl_enable_ssl</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_tcp_stream_ssl_enable_ssl     (<link linkend="CamelTcpStreamSSL">CamelTcpStreamSSL</link> *ssl);</programlisting>
<para>
Toggles an ssl-capable stream into ssl mode (if it isn't already).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ssl</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelTcpStreamSSL"><type>CamelTcpStreamSSL</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>%0 on success or <link linkend="1:CAPS"><literal>-1</literal></link> on fail
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
