summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acme-client/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Allow to have multiple domain ... {} sextions with the same domainbenno2020-05-101-3/+3
| | | | | | | | | | | name, by adding a new (optional) config option "domain name". This can be used to create a rsa and an ecdsa key for the same domain name. The old domain name in the 'title' line continues to be used as domain name in the abscence of the domain name argument, i.e. the change is backward compatible with current config files. tested by sthen@ ok florian@ sthen@
* Do not define variables in extern.h since this will lead to duplicateflorian2020-02-071-3/+4
| | | | | | definitions in every source file that includes extern.h. From Michael Forney (mforney AT mforney DOT org), thanks! OK jca
* Implement elliptic curve account keys.florian2019-06-171-2/+3
| | | | | OK benno Input & OK tb
* Trade unveil(2) for chroot(2).florian2019-06-161-32/+23
| | | | | | | | | | | This uses less code and unveil(2) seems to be the better tool here. The directory one chroots into needs to be carefully setup (they are not) and comon wisedom is that root can break out of chroots. There is probably nothing wrong with the chroot code because of pledge but it still makes me feel uneasy. input & OK on previous version mestre OK on previous version deraadt bug found, input & OK benno
* acctkey indirection is unnecessary, just pass authority->accountflorian2019-06-161-5/+2
|
* Track key type (RSA or ECDSA) in an enum and clean up a bit while here.florian2019-06-141-7/+3
| | | | | Originaly from Renaud Allard following input from benno, tweaked by me. OK benno
* use acme-client to sign certificated with ecdsa keysgilles2019-06-121-1/+6
| | | | diff from Renaud Allard <renaud@allard.it>, ok to get in from florian@
* Remove A and D flag, they are superfluous.florian2019-06-081-28/+5
| | | | | One could always use them on the command line and acme-client would do the right thing.
* Implement RFC 8555 "Automatic Certificate Management Environmentflorian2019-06-071-2/+2
| | | | | | | | | | | | | (ACME)" to be able to talk to the v02 Let's Encrypt API. With this acme-client(1) will no longer be able to talk to the v01 API. Users must change the api url in /etc/acme-client.conf to https://acme-v02.api.letsencrypt.org/directory Existing accounts (and certs of course) stay valid and after the url change acme-client will be able to renew certs. Tested by Renaud Allard and benno Input & OK benno
* remove free() before exit() from main(), in ongoing work to makebenno2019-03-091-22/+1
| | | | | | things more readable. otto notes that free() does some checks, but in this case readability is better than complete cleanup. ok florian@ deraadt@
* use temporary strings for calls to basename(), because it may changebenno2019-03-091-13/+20
| | | | | | the contents of its argument (on other platforms). Also strdup() the result, because basename returns a pointer to static memory. ok florian@
* fix dirname usage in acme-client: dirname() can modify its argumentbenno2019-03-081-16/+20
| | | | | | | | | (it does not on OpenBSD) so we need to us a copy of the string. In addition, copy the result of dirname() as well, because it's static storage and if we call dirname() again it will be overwritten. Original problem noted and fix suggested by Wolf (wolf AT wolfsden DOT cz) ok florian@
* add an extra check for existing "api ..." line in the config.benno2019-01-291-6/+1
| | | | | move the check of existing "account ..." line from main.c to the parser. ok deraadt@
* cleanup initialization of chngdir. inspired by Ross L Richardson.benno2018-07-301-7/+4
| | | | ok tb@
* replace exit() with return(), from Ross L Richardson.benno2018-07-301-4/+4
| | | | ok tb@ (previous 3 commits to main.c as well)
* replace warn() + exit() with err()benno2018-07-301-5/+3
| | | | From Ross L Richardson.
* line too long and whitespace. From Ross L Richardson.benno2018-07-301-4/+5
|
* reorder option parsing to be alphabetical/same order as usage andbenno2018-07-301-12/+12
| | | | manpage. From Ross L Richardson.
* Deprecate agreement url config option and get the information from theflorian2017-11-271-5/+3
| | | | | | | | directory call. This way we don't need to update the acme-client.conf file every time it changes. Still parse the option, ignore and warn about it for a release. Sysmerge should be able to handle the removal. "nice" deraadt@ OK benno
* Use basename(3) instead of hand rolling it.florian2017-05-271-15/+11
| | | | | | | Gets rid of double slashes, pointed out by Raf Czlonka (rczlonka at gmail), thanks! OK benno
* pull root check up, the parser will bomb out anywayflorian2017-03-231-4/+4
| | | | OK benno
* Make returns consistent and remove parentheses per style(9).jsing2017-01-241-4/+3
| | | | | | Transformed with coccinelle. Requested by and ok tb@
* Complete jsing's coccinelle cleanup... by handderaadt2017-01-241-2/+2
| | | | ok jsing
* errx() does not need extra newlinederaadt2017-01-241-4/+4
|
* Replace comparisons between a constant or enum and an expression, withjsing2017-01-241-38/+38
| | | | | | | | | a comparison between the expression and the constant or enum. This significantly improves readability. Transformed with coccinelle. Requested by deraadt@
* tweak previous;jmc2017-01-211-2/+2
|
* move config data structures mostly to TAILQs, because that way webenno2017-01-211-2/+2
| | | | | | preserve order. ok florian@
* it is ok to only specify a full chain certificateflorian2017-01-211-16/+25
| | | | OK benno
* add option 'domain full chain certificate "path"',benno2017-01-211-3/+15
| | | | | | revokation works, the fullchain file will be unlinked. ok florian
* Implement domain chain certificate.florian2017-01-211-3/+14
| | | | OK benno
* Split certificate file from config file into certdir and certfile.florian2017-01-211-6/+17
| | | | | | | | | This way we can still chroot to certdir but the the certificate file is not fixed to "cert.pem". Writing of chain.pem and fullchain.pem is currently broken with this. OK benno
* Remove backup option. This is not acme-client's business; also it getsflorian2017-01-211-8/+4
| | | | | in the way. OK benno
* We are only dealing with one domain on the command lineflorian2017-01-211-12/+2
| | | | OK benno
* typo; ok bennoflorian2017-01-211-2/+2
|
* typo; ok bennoflorian2017-01-211-2/+2
|
* acme-client use configuration file [5 of 5]benno2017-01-211-3/+9
| | | | | | implement new -n option to check and print configuration ok florian
* acme-client use configuration file [4 of 5]benno2017-01-211-2/+2
| | | | | | fix getopt() ok florian
* acme-client use configuration file [3 of 5]benno2017-01-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | change command line options: n -> A new Account key N -> D new Domain key With this acme-client has these main usage patterns: * create new Account Key and Domain Key and get a certificate: acme-client -A -D www.example.com * renew certificate: acme-client www.example.com * revoke certificate: acme-client -r www.example.com ok florian
* acme-client use configuration file [2 of 5]benno2017-01-211-15/+7
| | | | | | | - add challengedir option to config file - remove -C option from command line ok florian
* acme-client use configuration file [1 of 5]benno2017-01-211-125/+70
| | | | | | | | | | | | | | | | | | | | | | 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
* add a config file parser to acme-client (unused at the moment, so thatbenno2016-09-181-18/+2
| | | | | it can be worked on in the tree). ok florian@ deraadt@
* A small amount more KNF to make this easier on our eyes. Not going furtherderaadt2016-09-131-15/+11
| | | | | than this. ok florian
* hoist local variable initialization directly into the definitions,deraadt2016-09-131-16/+10
| | | | | rather than doing it right afterwards. ok florian
* Inconsistant use of case (value): idiom drives me nuts, I have no ideaderaadt2016-09-131-15/+15
| | | | what purpose it was intended to serve.
* update usage(); pointed out by jmc@florian2016-09-011-3/+3
|
* Implement table driven selection to which ACME authorities we canflorian2016-09-011-9/+29
| | | | | | | | | talk. Suggest by and OK deraadt, OK benno. (Later on deraadt and benno discussed if this should be handled with a config file. This seems to be good enough for now. We can do a config file later.)
* we don't have config.hflorian2016-09-011-4/+1
|
* line wrap usagederaadt2016-09-011-10/+5
|
* Collapse krazy abstractions for other sandbox models, using chroot andderaadt2016-09-011-9/+5
| | | | | pledge directly as needed. ok florian
* knfbenno2016-09-011-15/+15
|