ssl-proxy.h revision cec3230c9b2a96bac1ea42c69475e8aea4b91eab
ef50336eefcb9ba99f73c6af37420eaf8857a39bTimo Sirainentypedef int ssl_handshake_callback_t(void *context);
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen/* establish SSL connection with the given fd, returns a new fd which you
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen must use from now on, or -1 if error occurred. Unless -1 is returned,
5694eeb99b69dea8033ca77ad69743c6b4871370Timo Sirainen the given fd must be simply forgotten. */
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenint ssl_proxy_alloc(int fd, const struct ip_addr *ip,
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenint ssl_proxy_client_alloc(int fd, struct ip_addr *ip,
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen ssl_handshake_callback_t *callback, void *context,
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenvoid ssl_proxy_set_client(struct ssl_proxy *proxy, struct client *client);
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenbool ssl_proxy_has_valid_client_cert(const struct ssl_proxy *proxy) ATTR_PURE;
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenbool ssl_proxy_has_broken_client_cert(struct ssl_proxy *proxy);
de486b59018016977015ef42e6071155b60e82e1Timo Sirainenconst char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy);
de486b59018016977015ef42e6071155b60e82e1Timo Sirainenbool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy) ATTR_PURE;
de486b59018016977015ef42e6071155b60e82e1Timo Sirainenconst char *ssl_proxy_get_last_error(const struct ssl_proxy *proxy) ATTR_PURE;
de486b59018016977015ef42e6071155b60e82e1Timo Sirainenconst char *ssl_proxy_get_security_string(struct ssl_proxy *proxy);
de486b59018016977015ef42e6071155b60e82e1Timo Sirainen/* Return number of active SSL proxies */
de486b59018016977015ef42e6071155b60e82e1Timo Sirainenunsigned int ssl_proxy_get_count(void) ATTR_PURE;