ssl-proxy.h revision 6ef7e31619edfaa17ed044b45861d106a86191ef
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294Timo Sirainen#ifndef __SSL_PROXY_H
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch#define __SSL_PROXY_H
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch
7384b4e78eaab44693c985192276e31322155e32Stephan Boschstruct ip_addr;
7384b4e78eaab44693c985192276e31322155e32Stephan Boschstruct ssl_proxy;
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch
7384b4e78eaab44693c985192276e31322155e32Stephan Boschextern bool ssl_initialized;
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch/* establish SSL connection with the given fd, returns a new fd which you
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch must use from now on, or -1 if error occurred. Unless -1 is returned,
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch the given fd must be simply forgotten. */
7384b4e78eaab44693c985192276e31322155e32Stephan Boschint ssl_proxy_new(int fd, struct ip_addr *ip, struct ssl_proxy **proxy_r);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschbool ssl_proxy_has_valid_client_cert(struct ssl_proxy *proxy);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschconst char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid ssl_proxy_free(struct ssl_proxy *proxy);
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid ssl_proxy_init(void);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid ssl_proxy_deinit(void);
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch#endif
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch