ssl-proxy.h revision 42a6ae32e417eb19b48ef312b988d0a527b85ed7
a3fe8c0c54d87822f4b4f8f0d10caac611861b2bTimo Sirainentypedef int ssl_handshake_callback_t(void *context);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen/* establish SSL connection with the given fd, returns a new fd which you
c99fe55d4535d839a6ad0735c4719e076a1adb2cTimo Sirainen must use from now on, or -1 if error occurred. Unless -1 is returned,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen the given fd must be simply forgotten. */
96d19229e5f322411eb84446e5477d8170cfa5afTimo Sirainenint ssl_proxy_alloc(int fd, const struct ip_addr *ip, pool_t set_pool,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenint ssl_proxy_client_alloc(int fd, struct ip_addr *ip, pool_t set_pool,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen ssl_handshake_callback_t *callback, void *context,
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenvoid ssl_proxy_set_client(struct ssl_proxy *proxy, struct client *client);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenbool ssl_proxy_has_valid_client_cert(const struct ssl_proxy *proxy) ATTR_PURE;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenbool ssl_proxy_has_broken_client_cert(struct ssl_proxy *proxy);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenint ssl_proxy_cert_match_name(struct ssl_proxy *proxy, const char *verify_name);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenconst char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenbool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy) ATTR_PURE;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenconst char *ssl_proxy_get_last_error(const struct ssl_proxy *proxy) ATTR_PURE;
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenconst char *ssl_proxy_get_security_string(struct ssl_proxy *proxy);
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainenconst char *ssl_proxy_get_compression(struct ssl_proxy *proxy);
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen/* Return number of active SSL proxies */
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainenunsigned int ssl_proxy_get_count(void) ATTR_PURE;