diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-01-16 15:19:49 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-16 15:19:49 +0800 |
commit | 405f1c52290c72da9108d637d6b69cd33c296b80 (patch) | |
tree | 790fa0ad398b2d6f68565e723de635a18098fd02 /camel/camel-session.c | |
parent | 1511e09691ffb94c99b7e2343162aefd4d298f9d (diff) | |
download | gsoc2013-evolution-405f1c52290c72da9108d637d6b69cd33c296b80.tar.gz gsoc2013-evolution-405f1c52290c72da9108d637d6b69cd33c296b80.tar.zst gsoc2013-evolution-405f1c52290c72da9108d637d6b69cd33c296b80.zip |
Ugh, this design is ugly like my butt.
2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
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
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r-- | camel/camel-session.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c index d834bad54c..1c3f108616 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -436,6 +436,31 @@ camel_session_query_authenticator (CamelSession *session, service, item, ex); } +#ifdef U_CANT_TOUCH_THIS +/** + * camel_session_query_cert_authenticator: + * @session: session object + * @prompt: prompt to query user with + * + * This function is used by SSL to discuss certificate authentication + * information with the application and/or user. Allows the user to + * override the SSL certificate authenticator, which, at this point, + * must have failed to authenticate the server. + * + * UI should be a Yes/No prompt probably defaulting to No. + * + * Return value: TRUE if the user decides that the SSL connection + * should continue with the untrusted server or FALSE otherwise. + **/ +gboolean +camel_session_query_cert_authenticator (CamelSession *session, + char *prompt) +{ + return session->cert_authenticator (prompt); +} +#endif /* U_CANT_TOUCH_THIS */ + + /** * camel_session_register_timeout: Register a timeout to be called * periodically. |