diff src/login-common/ssl-proxy.h @ 9165:96678e83eab6 HEAD

imap/pop3 proxy: Support SSL/TLS connections to remote servers. passdb can return ssl=yes, ssl=any-cert and starttls options.
author Timo Sirainen <tss@iki.fi>
date Tue, 28 Apr 2009 22:55:03 -0400
parents 6324a79d3ee1
children 02721ba17309
line wrap: on
line diff
--- a/src/login-common/ssl-proxy.h	Tue Apr 28 19:57:10 2009 -0400
+++ b/src/login-common/ssl-proxy.h	Tue Apr 28 22:55:03 2009 -0400
@@ -1,15 +1,22 @@
 #ifndef SSL_PROXY_H
 #define SSL_PROXY_H
 
+#include "ioloop.h"
+
 struct ip_addr;
 struct ssl_proxy;
 
 extern bool ssl_initialized;
 
+typedef int ssl_handshake_callback_t(void *context);
+
 /* establish SSL connection with the given fd, returns a new fd which you
    must use from now on, or -1 if error occurred. Unless -1 is returned,
    the given fd must be simply forgotten. */
 int ssl_proxy_new(int fd, const struct ip_addr *ip, struct ssl_proxy **proxy_r);
+int ssl_proxy_client_new(int fd, struct ip_addr *ip,
+			 ssl_handshake_callback_t *callback, void *context,
+			 struct ssl_proxy **proxy_r);
 bool ssl_proxy_has_valid_client_cert(const struct ssl_proxy *proxy) ATTR_PURE;
 bool ssl_proxy_has_broken_client_cert(struct ssl_proxy *proxy);
 const char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy);