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-session.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'camel/camel-session.h') diff --git a/camel/camel-session.h b/camel/camel-session.h index 9ae9eec089..d740830d7e 100644 --- a/camel/camel-session.h +++ b/camel/camel-session.h @@ -51,6 +51,12 @@ typedef char *(*CamelAuthCallback) (CamelAuthCallbackMode mode, char *data, gboolean secret, CamelService *service, char *item, CamelException *ex); + +#ifdef U_CANT_TOUCH_THIS +/* this is just a guess as to what we'll actually need */ +typedef gboolean (*CamelBadCertCallback) (char *data); +#endif + typedef gboolean (*CamelTimeoutCallback) (gpointer data); typedef guint (*CamelTimeoutRegisterCallback) (guint32 interval, CamelTimeoutCallback cb, @@ -64,6 +70,9 @@ struct _CamelSession char *storage_path; CamelAuthCallback authenticator; +#ifdef U_CANT_TOUCH_THIS + CamelBadCertCallback cert_authenticator; +#endif CamelTimeoutRegisterCallback registrar; CamelTimeoutRemoveCallback remover; @@ -118,6 +127,11 @@ char * camel_session_query_authenticator (CamelSession *session, char *item, CamelException *ex); +#ifdef U_CANT_TOUCH_THIS +gboolean camel_session_query_cert_authenticator (CamelSession *session, + char *prompt); +#endif + guint camel_session_register_timeout (CamelSession *session, guint32 interval, CamelTimeoutCallback callback, -- cgit