summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-09-24 17:51:29 -0400
committerDrew DeVault <sir@cmpwn.com>2020-09-24 17:51:29 -0400
commit0d1137f987d78f83e1222ece29a1438a49658d3c (patch)
tree01ba72c6f8b7dfc7b4f3e112ee3dd50e443d7ed0 /include
parente15aca171dd5a3d1954699252540bda2c832a8fa (diff)
downloadgmnisrv-0d1137f987d78f83e1222ece29a1438a49658d3c.tar.gz
gmnisrv-0d1137f987d78f83e1222ece29a1438a49658d3c.tar.xz
gmnisrv-0d1137f987d78f83e1222ece29a1438a49658d3c.zip
Implement TLS store
Includes hands-free certificate generation and loading
Diffstat (limited to 'include')
-rw-r--r--include/config.h2
-rw-r--r--include/tls.h8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 9455c2b..d42a1bf 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1,6 +1,7 @@
#ifndef GMNISRV_CONFIG
#define GMNISRV_CONFIG
#include <arpa/inet.h>
+#include <openssl/x509.h>
struct gmnisrv_tls {
char *store;
@@ -11,6 +12,7 @@ struct gmnisrv_tls {
struct gmnisrv_host {
char *hostname;
char *root;
+ SSL_CTX *ssl_ctx;
struct gmnisrv_host *next;
};
diff --git a/include/tls.h b/include/tls.h
new file mode 100644
index 0000000..bc088ef
--- /dev/null
+++ b/include/tls.h
@@ -0,0 +1,8 @@
+#ifndef GMNISRV_TLS
+#define GMNISRV_TLS
+
+struct gmnisrv_config;
+
+int gmnisrv_tls_init(struct gmnisrv_config *conf);
+
+#endif