|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
struct CamelTcpStreamSSL; enum CamelTcpStreamSSLFlags; CamelStream * camel_tcp_stream_ssl_new (CamelSession *session,const gchar *expected_host,CamelTcpStreamSSLFlags flags); CamelStream * camel_tcp_stream_ssl_new_raw (CamelSession *session,const gchar *expected_host,CamelTcpStreamSSLFlags flags); gint camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl,GCancellable *cancellable,GError **error);
struct CamelTcpStreamSSL {
	CamelTcpStreamRaw parent_object;
	CamelTcpStreamSSLPrivate *priv;
};
typedef enum {
 /*< flags >*/
	CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 = 1 << 0,
	CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 = 1 << 1,
	CAMEL_TCP_STREAM_SSL_ENABLE_TLS = 1 << 2
} CamelTcpStreamSSLFlags;
CamelStream * camel_tcp_stream_ssl_new (CamelSession *session,const gchar *expected_host,CamelTcpStreamSSLFlags flags);
Since the SSL certificate authenticator may need to prompt the
user, a CamelSession is needed. expected_host is needed as a
protection against an MITM attack.
| 
 | an active CamelSession object | 
| 
 | host that the stream is expected to connect with | 
| 
 | a bitwise combination of CamelTcpStreamSSLFlags | 
| Returns : | a new CamelTcpStreamSSL stream preset in SSL mode | 
CamelStream * camel_tcp_stream_ssl_new_raw (CamelSession *session,const gchar *expected_host,CamelTcpStreamSSLFlags flags);
Since the SSL certificate authenticator may need to prompt the
user, a CamelSession is needed. expected_host is needed as a
protection against an MITM attack.
| 
 | an active CamelSession object | 
| 
 | host that the stream is expected to connect with | 
| 
 | a bitwise combination of CamelTcpStreamSSLFlags | 
| Returns : | a new CamelTcpStreamSSL stream not yet toggled into SSL mode | 
gint camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl,GCancellable *cancellable,GError **error);
Toggles an ssl-capable stream into ssl mode (if it isn't already).
| 
 | a CamelTcpStreamSSL object | 
| 
 | optional GCancellable object, or NULL | 
| 
 | return location for a GError, or NULL | 
| Returns : | 0on success or-1on fail |