about summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-28 17:45:42 -0400
committerJune McEnroe <june@causal.agency>2020-08-28 18:14:25 -0400
commitd367723c4747ad369c8ce7f5a64c8a4c37e5f5c3 (patch)
tree3d526646ddb2adafa10bdd6ace8f231a09df154d /bounce.h
parentSandbox pounce with pledge(2) (diff)
downloadpounce-d367723c4747ad369c8ce7f5a64c8a4c37e5f5c3.tar.gz
pounce-d367723c4747ad369c8ce7f5a64c8a4c37e5f5c3.zip
Refactor certificate loading and load all certs from config paths
Diffstat (limited to 'bounce.h')
-rw-r--r--bounce.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bounce.h b/bounce.h
index b09a349..6b376ae 100644
--- a/bounce.h
+++ b/bounce.h
@@ -25,6 +25,7 @@
  * covered work.
  */
 
+#include <limits.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -208,6 +209,14 @@ void stateSync(struct Client *client);
 const char *stateNick(void);
 const char *stateEcho(void);
 
+struct Cert {
+	int parent;
+	int target;
+	char name[NAME_MAX];
+};
+int certOpen(struct Cert *cert, const char *path);
+FILE *certFile(const struct Cert *cert);
+
 const char *configPath(const char **dirs, const char *path);
 const char *dataPath(const char **dirs, const char *path);
 FILE *configOpen(const char *path, const char *mode);