From 405f1c52290c72da9108d637d6b69cd33c296b80 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 16 Jan 2001 07:19:49 +0000 Subject: Ugh, this design is ugly like my butt. 2001-01-16 Jeffrey Stedfast Ugh, this design is ugly like my butt. * camel-session.c (camel_session_query_cert_authenticator): New function which will be useful when we integrate SSL. * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate a certificate. (ssl_bad_cert): Callback that gets the reason the certificate is bad and then calls camel's cert-authenticator callback to notify the user and to allow the user to override the check. (stream_connect): Set the URL we expect to connect with and setup the auth_cert and bad_cert callbacks. (camel_tcp_stream_ssl_new): Now takes a CamelSession and a expected_host argument that it will use for certificate authentication. (camel_tcp_stream_ssl_finalize): Unref the session and free the expected_host. svn path=/trunk/; revision=7531 --- camel/camel-tcp-stream-ssl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'camel/camel-tcp-stream-ssl.h') diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h index 2e7ad343a5..de6eb1a8bc 100644 --- a/camel/camel-tcp-stream-ssl.h +++ b/camel/camel-tcp-stream-ssl.h @@ -31,8 +31,8 @@ extern "C" { #endif /* __cplusplus */ #include -#include -#include +#include +#include #define CAMEL_TCP_STREAM_SSL_TYPE (camel_tcp_stream_ssl_get_type ()) #define CAMEL_TCP_STREAM_SSL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL)) @@ -44,6 +44,9 @@ struct _CamelTcpStreamSSL CamelTcpStream parent_object; PRFileDesc *sockfd; + + CamelSession *session; + char *expected_host; }; typedef struct { @@ -57,7 +60,7 @@ typedef struct { CamelType camel_tcp_stream_ssl_get_type (void); /* public methods */ -CamelStream *camel_tcp_stream_ssl_new (void); +CamelStream *camel_tcp_stream_ssl_new (CamelSession *session, const char *expected_host); #ifdef __cplusplus } -- cgit v1.2.3