ssl-proxy.h revision 38318f5e82662615cd88e99e398efe4a630ce020
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainen/* establish SSL connection with the given fd, returns a new fd which you
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainen must use from now on, or -1 if error occurred. Unless -1 is returned,
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainen the given fd must be simply forgotten. */
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenint ssl_proxy_new(int fd, struct ip_addr *ip, struct ssl_proxy **proxy_r);
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenbool ssl_proxy_has_valid_client_cert(const struct ssl_proxy *proxy) ATTR_PURE;
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenbool ssl_proxy_has_broken_client_cert(struct ssl_proxy *proxy);
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenconst char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy);
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenbool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy) ATTR_PURE;
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenconst char *ssl_proxy_get_last_error(const struct ssl_proxy *proxy) ATTR_PURE;
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenconst char *ssl_proxy_get_security_string(struct ssl_proxy *proxy);
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainen/* Return number of active SSL proxies */
12ff27eadb44c6877298d3e214c7039342669669Timo Sirainenunsigned int ssl_proxy_get_count(void) ATTR_PURE;