diff options
author | June McEnroe <june@causal.agency> | 2020-08-28 17:45:42 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-28 18:14:25 -0400 |
commit | d367723c4747ad369c8ce7f5a64c8a4c37e5f5c3 (patch) | |
tree | 3d526646ddb2adafa10bdd6ace8f231a09df154d /bounce.h | |
parent | Sandbox pounce with pledge(2) (diff) | |
download | pounce-d367723c4747ad369c8ce7f5a64c8a4c37e5f5c3.tar.gz pounce-d367723c4747ad369c8ce7f5a64c8a4c37e5f5c3.zip |
Refactor certificate loading and load all certs from config paths
Diffstat (limited to '')
-rw-r--r-- | bounce.h | 9 |
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); |