diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-01-21 08:41:43 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-01-21 08:41:43 +0000 |
commit | 43e607fe8411e74d215bd7af59fc367cefea5c32 (patch) | |
tree | 404c4e892e528ee6a6f6077c1b5a3de14f5effed /usr.sbin/acme-client/netproc.c | |
parent | 97f5422ef61ccb1b3307b8d097087eac5a9c5c1a (diff) |
acme-client use configuration file [1 of 5]
start using the configuration file and delete command line arguments:
-a agreement -> agreement url ...
-c certdir -> domain certificate "path"
-f accountkey -> account key "path"
-k domainkey -> domain key "path"
-s authority -> sign with "name"
new argument:
-f configfile
the changes needed to use the new configuration are local to main.c for now.
While the configuration could be passed directly to netproc(), keyproc() etc,
the diff is smaller this way.
This also removes the multidir (-m) mode for now - specify different paths in
each domain {} block instead.
ok florian
Diffstat (limited to 'usr.sbin/acme-client/netproc.c')
-rw-r--r-- | usr.sbin/acme-client/netproc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/acme-client/netproc.c b/usr.sbin/acme-client/netproc.c index 24ab4bfea49..fd86d482867 100644 --- a/usr.sbin/acme-client/netproc.c +++ b/usr.sbin/acme-client/netproc.c @@ -1,4 +1,4 @@ -/* $Id: netproc.c,v 1.10 2016/10/04 15:49:42 jsing Exp $ */ +/* $Id: netproc.c,v 1.11 2017/01/21 08:41:42 benno Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -25,6 +25,7 @@ #include "http.h" #include "extern.h" +#include "parse.h" #define RETRY_DELAY 5 #define RETRY_MAX 10 @@ -565,8 +566,8 @@ dofullchain(struct conn *c, const char *addr) */ int netproc(int kfd, int afd, int Cfd, int cfd, int dfd, int rfd, - int newacct, int revocate, int authority, const char *const *alts, - size_t altsz, const char *agreement) + int newacct, int revocate, struct authority_c *authority, + const char *const *alts,size_t altsz, const char *agreement) { int rc = 0; size_t i; @@ -643,7 +644,7 @@ netproc(int kfd, int afd, int Cfd, int cfd, int dfd, int rfd, c.dfd = dfd; c.fd = afd; - c.na = authorities[authority].caurl; + c.na = authority->api; /* * Look up the domain of the ACME server. |