X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=onak-conf.h;h=5d39f6ab2a44bcdd06af245d178b4742474adb3f;hp=0d937c23d3578db380935a3dc6f322074718add3;hb=58ed9a0076feb9604154b99da6ed1907ca7df089;hpb=2458360e75aa46091f60c16e041c07bffe2edefb diff --git a/onak-conf.h b/onak-conf.h index 0d937c2..5d39f6a 100644 --- a/onak-conf.h +++ b/onak-conf.h @@ -14,14 +14,17 @@ * more details. * * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * this program. If not, see . */ #ifndef __ONAK_CONF_H_ #define __ONAK_CONF_H_ -#include "keydb.h" +#include +#include + +#include "keyarray.h" +#include "ll.h" /** * @brief Backend database configuration. @@ -87,8 +90,21 @@ struct onak_config { /** Pointer to the initialisation function for our loaded DB backend */ struct onak_dbctx *(*dbinit)(struct onak_db_config *, bool); - /** Should we verify signature hashes match? */ - bool check_sighash; + /** Blacklist of fingerprints to reject */ + struct keyarray blacklist; + + /** What policies should we use for cleaning keys? */ + uint64_t clean_policies; + + /* + * Options used by the email handling script. + * None of the C code uses this information, but we should be able + * to parse it. + */ + /** Location of the onak binary, so the mail script can find it. */ + char *bin_dir; + /** Where incoming mail gets queue, one file per mail. */ + char *mail_dir; }; /** @@ -105,9 +121,23 @@ extern struct onak_config config; */ void readconfig(const char *configfile); +/** + * @brief write the onak config. + * @param configfile the config file to write to. + * + * Write out the config file. If config file is NULL write it to STDOUT. + */ +void writeconfig(const char *configfile); + /** * @brief clean up the config when we're shutting down. */ void cleanupconfig(void); + +/** + * @brief Find a specified backend configuration by name. + */ +struct onak_db_config *find_db_backend_config(struct ll *backends, char *name); + #endif /* __ONAK_CONF_H_ */