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