aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-tcp-stream.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-17 07:02:04 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-17 07:02:04 +0800
commita9df5de4af55791e4d4aeb3533bcc715e28c1512 (patch)
tree0b9faa4b152a9c3589226000c9e4fb01620f3225 /camel/camel-tcp-stream.c
parent13afe783505cb99b902ec4b29c46fb14ec8006f0 (diff)
downloadgsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.gz
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.zst
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.zip
Print info about the issuer of the certificate.
2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the issuer of the certificate. * providers/smtp/camel-smtp-transport.c (smtp_connect): Use camel_tcp_stream_get_socket(). * camel-tcp-stream-openssl.c (stream_get_socket): Implemented. * camel-tcp-stream-ssl.c (stream_get_socket): Implemented. * camel-tcp-stream-raw.c (stream_get_socket): Implemented. * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function. svn path=/trunk/; revision=8764
Diffstat (limited to 'camel/camel-tcp-stream.c')
-rw-r--r--camel/camel-tcp-stream.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/camel/camel-tcp-stream.c b/camel/camel-tcp-stream.c
index f42fa0f1d5..acbd108212 100644
--- a/camel/camel-tcp-stream.c
+++ b/camel/camel-tcp-stream.c
@@ -33,6 +33,7 @@ static CamelStreamClass *parent_class = NULL;
static int tcp_connect (CamelTcpStream *stream, struct hostent *host, int port);
static int tcp_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
static int tcp_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
+static gpointer tcp_get_socket (CamelTcpStream *stream);
static void
camel_tcp_stream_class_init (CamelTcpStreamClass *camel_tcp_stream_class)
@@ -46,6 +47,7 @@ camel_tcp_stream_class_init (CamelTcpStreamClass *camel_tcp_stream_class)
camel_tcp_stream_class->connect = tcp_connect;
camel_tcp_stream_class->getsockopt = tcp_getsockopt;
camel_tcp_stream_class->setsockopt = tcp_setsockopt;
+ camel_tcp_stream_class->get_socket = tcp_get_socket;
}
static void
@@ -150,3 +152,28 @@ camel_tcp_stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *dat
return CTS_CLASS (stream)->setsockopt (stream, data);
}
+
+
+static gpointer
+tcp_get_socket (CamelTcpStream *stream)
+{
+ g_warning ("CamelTcpStream::get_socket called on default implementation\n");
+ return NULL;
+}
+
+
+/**
+ * camel_tcp_stream_get_socket:
+ * @stream: tcp stream object
+ *
+ * Get the stream's socket.
+ *
+ * Return value: the stream's socket on success or NULL on failure.
+ **/
+gpointer
+camel_tcp_stream_get_socket (CamelTcpStream *stream)
+{
+ g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
+
+ return CTS_CLASS (stream)->get_socket (stream);
+}