diff options
author | 2016-08-31 22:49:09 +0000 | |
---|---|---|
committer | 2016-08-31 22:49:09 +0000 | |
commit | 107b447781c64bf765906249adc27ab6718483d5 (patch) | |
tree | 013baef74d51cf18c94fe5401ea10c5608c305a5 | |
parent | Split the check-setup target into smaller parts to make it easier (diff) | |
download | wireguard-openbsd-107b447781c64bf765906249adc27ab6718483d5.tar.xz wireguard-openbsd-107b447781c64bf765906249adc27ab6718483d5.zip |
whitespace
-rw-r--r-- | usr.sbin/acme-client/chngproc.c | 20 | ||||
-rw-r--r-- | usr.sbin/acme-client/dbg.c | 6 | ||||
-rw-r--r-- | usr.sbin/acme-client/dnsproc.c | 26 | ||||
-rw-r--r-- | usr.sbin/acme-client/extern.h | 8 |
4 files changed, 30 insertions, 30 deletions
diff --git a/usr.sbin/acme-client/chngproc.c b/usr.sbin/acme-client/chngproc.c index a868572a7fc..f7c11e2306c 100644 --- a/usr.sbin/acme-client/chngproc.c +++ b/usr.sbin/acme-client/chngproc.c @@ -1,4 +1,4 @@ -/* $Id: chngproc.c,v 1.1 2016/08/31 22:01:42 florian Exp $ */ +/* $Id: chngproc.c,v 1.2 2016/08/31 22:49:09 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -56,14 +56,14 @@ chngproc(int netsock, const char *root, int remote) else if ( ! sandbox_after()) goto out; - /* + /* * Loop while we wait to get a thumbprint and token. * We'll get this for each SAN request. */ for (;;) { op = CHNG__MAX; - if (0 == (lval = readop(netsock, COMM_CHNG_OP))) + if (0 == (lval = readop(netsock, COMM_CHNG_OP))) op = CHNG_STOP; else if (CHNG_SYN == lval) op = lval; @@ -76,7 +76,7 @@ chngproc(int netsock, const char *root, int remote) assert(CHNG_SYN == op); - /* + /* * Read the thumbprint and token. * The token is the filename, so store that in a vector * of tokens that we'll later clean up. @@ -113,17 +113,17 @@ chngproc(int netsock, const char *root, int remote) if (remote) { puts("RUN THIS IN THE CHALLENGE DIRECTORY"); puts("YOU HAVE 20 SECONDS..."); - printf("doas sh -c \"echo %s > %s\"\n", + printf("doas sh -c \"echo %s > %s\"\n", fmt, fs[fsz - 1]); sleep(20); puts("TIME'S UP."); - } else { - /* + } else { + /* * Create and write to our challenge file. * Note: we use file descriptors instead of FILE * because we want to minimise our pledges. */ - fd = open(fs[fsz - 1], + fd = open(fs[fsz - 1], O_WRONLY|O_EXCL|O_CREAT, 0444); if (-1 == fd) { warn("%s", fs[fsz - 1]); @@ -144,8 +144,8 @@ chngproc(int netsock, const char *root, int remote) dodbg("%s/%s: created", root, fs[fsz - 1]); - /* - * Write our acknowledgement. + /* + * Write our acknowledgement. * Ignore reader failure. */ diff --git a/usr.sbin/acme-client/dbg.c b/usr.sbin/acme-client/dbg.c index d3910fdcf4c..5ba84a8a0e0 100644 --- a/usr.sbin/acme-client/dbg.c +++ b/usr.sbin/acme-client/dbg.c @@ -1,4 +1,4 @@ -/* $Id: dbg.c,v 1.1 2016/08/31 22:01:42 florian Exp $ */ +/* $Id: dbg.c,v 1.2 2016/08/31 22:49:09 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -27,7 +27,7 @@ void doddbg(const char *fmt, ...) { - va_list ap; + va_list ap; if (verbose < 2) return; @@ -40,7 +40,7 @@ doddbg(const char *fmt, ...) void dodbg(const char *fmt, ...) { - va_list ap; + va_list ap; if ( ! verbose) return; diff --git a/usr.sbin/acme-client/dnsproc.c b/usr.sbin/acme-client/dnsproc.c index e00c3454af3..50b808237a5 100644 --- a/usr.sbin/acme-client/dnsproc.c +++ b/usr.sbin/acme-client/dnsproc.c @@ -1,4 +1,4 @@ -/* $Id: dnsproc.c,v 1.1 2016/08/31 22:01:42 florian Exp $ */ +/* $Id: dnsproc.c,v 1.2 2016/08/31 22:49:09 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -68,22 +68,22 @@ host_dns(const char *s, struct addr *vec) error = getaddrinfo(s, NULL, &hints, &res0); - if (error == EAI_AGAIN || + if (error == EAI_AGAIN || /* FIXME */ #ifndef __FreeBSD__ - error == EAI_NODATA || + error == EAI_NODATA || #endif error == EAI_NONAME) return(0); if (error) { - warnx("%s: parse error: %s", + warnx("%s: parse error: %s", s, gai_strerror(error)); return(-1); } - for (vecsz = 0, res = res0; - NULL != res && vecsz < MAX_SERVERS_DNS; + for (vecsz = 0, res = res0; + NULL != res && vecsz < MAX_SERVERS_DNS; res = res->ai_next) { if (res->ai_family != AF_INET && res->ai_family != AF_INET6) @@ -93,13 +93,13 @@ host_dns(const char *s, struct addr *vec) if (AF_INET == res->ai_family) { vec[vecsz].family = 4; - inet_ntop(AF_INET, - &(((struct sockaddr_in *)sa)->sin_addr), + inet_ntop(AF_INET, + &(((struct sockaddr_in *)sa)->sin_addr), vec[vecsz].ip, INET6_ADDRSTRLEN); } else { vec[vecsz].family = 6; - inet_ntop(AF_INET6, - &(((struct sockaddr_in6 *)sa)->sin6_addr), + inet_ntop(AF_INET6, + &(((struct sockaddr_in6 *)sa)->sin6_addr), vec[vecsz].ip, INET6_ADDRSTRLEN); } @@ -142,7 +142,7 @@ dnsproc(int nfd) goto out; else if ( ! dropprivs()) goto out; - else if ( ! sandbox_after()) + else if ( ! sandbox_after()) goto out; /* @@ -167,7 +167,7 @@ dnsproc(int nfd) if (NULL == (look = readstr(nfd, COMM_DNSQ))) goto out; - /* + /* * Check if we're asked to repeat the lookup. * If not, request it from host_dns(). */ @@ -189,7 +189,7 @@ dnsproc(int nfd) break; else if (cc < 0) goto out; - for (i = 0; i < (size_t)vsz; i++) { + for (i = 0; i < (size_t)vsz; i++) { if (writeop(nfd, COMM_DNSF, v[i].family) <= 0) goto out; if (writestr(nfd, COMM_DNSA, v[i].ip) <= 0) diff --git a/usr.sbin/acme-client/extern.h b/usr.sbin/acme-client/extern.h index 10f4323aa99..eed991c7a0d 100644 --- a/usr.sbin/acme-client/extern.h +++ b/usr.sbin/acme-client/extern.h @@ -1,4 +1,4 @@ -/* $Id: extern.h,v 1.1 2016/08/31 22:01:42 florian Exp $ */ +/* $Id: extern.h,v 1.2 2016/08/31 22:49:09 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -152,7 +152,7 @@ enum comm { * (presumably!) local machine to an ACME connection; and a URI, to * which we must connect to verify the token. */ -struct chng { +struct chng { char *uri; /* uri on ACME server */ char *token; /* token we must offer */ size_t retry; /* how many times have we tried */ @@ -182,7 +182,7 @@ int acctproc(int, const char *, int); int certproc(int, int); int chngproc(int, const char *, int); int dnsproc(int); -int revokeproc(int, const char *, +int revokeproc(int, const char *, int, int, const char *const *, size_t); int fileproc(int, int, const char *); int keyproc(int, const char *, @@ -242,7 +242,7 @@ char *json_fmt_protected_rsa(const char *, char *json_fmt_revokecert(const char *); char *json_fmt_header_rsa(const char *, const char *); char *json_fmt_thumb_rsa(const char *, const char *); -char *json_fmt_signed(const char *, +char *json_fmt_signed(const char *, const char *, const char *, const char *); int dropprivs(void); |