summaryrefslogtreecommitdiff
path: root/uhttpd.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-04 18:28:10 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-04 18:29:03 +0100
commit119244d9b13e84eb898f9fb97e83cac260c1a0b5 (patch)
tree25ebecfa7b835f50f80fc65aa846880b0a988680 /uhttpd.h
parent70e4f40d0dd3f58da107789abc4ada1a40b91c42 (diff)
add basic tls support, todo: error handling
Diffstat (limited to 'uhttpd.h')
-rw-r--r--uhttpd.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/uhttpd.h b/uhttpd.h
index d67e48c..9ed6439 100644
--- a/uhttpd.h
+++ b/uhttpd.h
@@ -29,6 +29,9 @@
#include <libubox/ustream.h>
#include <libubox/blob.h>
#include <libubox/utils.h>
+#ifdef HAVE_TLS
+#include <libubox/ustream-ssl.h>
+#endif
#include "utils.h"
@@ -170,11 +173,12 @@ struct client {
struct ustream *us;
struct ustream_fd sfd;
#ifdef HAVE_TLS
- struct ustream_ssl stream_ssl;
+ struct ustream_ssl ssl;
#endif
struct uloop_timeout timeout;
enum client_state state;
+ bool tls;
struct http_request request;
struct uh_addr srv_addr, peer_addr;
@@ -192,7 +196,7 @@ extern struct dispatch_handler cgi_dispatch;
void uh_index_add(const char *filename);
-bool uh_accept_client(int fd);
+bool uh_accept_client(int fd, bool tls);
void uh_unblock_listeners(void);
void uh_setup_listeners(void);
@@ -214,6 +218,8 @@ uh_client_error(struct client *cl, int code, const char *summary, const char *fm
void uh_handle_request(struct client *cl);
void client_poll_post_data(struct client *cl);
+void uh_client_read_cb(struct client *cl);
+void uh_client_notify_state(struct client *cl);
void uh_auth_add(const char *path, const char *user, const char *pass);
bool uh_auth_check(struct client *cl, struct path_info *pi);