diff options
author | 2016-09-18 20:18:25 +0000 | |
---|---|---|
committer | 2016-09-18 20:18:25 +0000 | |
commit | 3943d84017a73defaa0dcb984006f23dc840db9c (patch) | |
tree | e5e1b3494df202a8fcf43851e654b9bc1653ce59 /usr.sbin/acme-client/main.c | |
parent | Convert imxccm(4) and imxiomuxc(4) to attach using the fdt. Use the "early" (diff) | |
download | wireguard-openbsd-3943d84017a73defaa0dcb984006f23dc840db9c.tar.xz wireguard-openbsd-3943d84017a73defaa0dcb984006f23dc840db9c.zip |
add a config file parser to acme-client (unused at the moment, so that
it can be worked on in the tree).
ok florian@ deraadt@
Diffstat (limited to 'usr.sbin/acme-client/main.c')
-rw-r--r-- | usr.sbin/acme-client/main.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/usr.sbin/acme-client/main.c b/usr.sbin/acme-client/main.c index 42cfc84114f..7252cdbd606 100644 --- a/usr.sbin/acme-client/main.c +++ b/usr.sbin/acme-client/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.13 2016/09/13 17:13:37 deraadt Exp $ */ +/* $Id: main.c,v 1.14 2016/09/18 20:18:25 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -26,6 +26,7 @@ #include <unistd.h> #include "extern.h" +#include "parse.h" #define SSL_DIR "/etc/ssl/acme" #define SSL_PRIV_DIR "/etc/ssl/acme/private" @@ -44,23 +45,6 @@ struct authority authorities[] = { }; /* - * This isn't RFC1035 compliant, but does the bare minimum in making - * sure that we don't get bogus domain names on the command line, which - * might otherwise screw up our directory structure. - * Returns zero on failure, non-zero on success. - */ -static int -domain_valid(const char *cp) -{ - - for (; '\0' != *cp; cp++) - if (!('.' == *cp || '-' == *cp || - '_' == *cp || isalnum((int)*cp))) - return (0); - return (1); -} - -/* * Wrap around asprintf(3), which sometimes nullifies the input values, * sometimes not, but always returns <0 on error. * Returns NULL on failure or the pointer on success. |