65 Commits

Author SHA1 Message Date
Lukas Schauer
082da2527c preparing for release 0.7.0 2020-12-10 16:54:26 +01:00
Lukas Schauer
e784ba3853 use normal error behaviour for failing http requests (fixes #782) 2020-12-10 16:32:26 +01:00
Lukas Schauer
abd369d062 allow to set domains.txt as cli argument (fixes #678) 2020-12-10 16:07:28 +01:00
Lukas Schauer
cb7fb82beb use secp384r1 as default (instead of rsa, fixes #651) 2020-12-10 16:01:54 +01:00
Lukas Schauer
174616becd use secp384r1 as default (instead of rsa, fixes #651) 2020-12-10 16:01:08 +01:00
Raphael Hoegger
27fd41d75f adding new CLI Command (--cleanupdelete / -gcd) to cleanup+delete (instead of just moving to /archive) (closes #587) 2020-12-10 14:58:14 +01:00
Lukas Schauer
ea106ef72e allow setting OCSP_FETCH and OCSP_DAYS per certificate config (closes #602, thx @bjacke) 2020-12-10 14:28:30 +01:00
Lukas Schauer
f2d6a6152e cleanup: also remove dangling symlinks 2020-12-10 14:15:07 +01:00
Arnout Vandecappelle (Essensium/Mind)
129ec851ed cleanup: also do cleanup if symlink is broken (closes #667)
The cleanup command skips filetypes for which the symlink is broken or
doesn't exist. However, if dehydrated fails, we may end up in exactly
the situation that the symlink doesn't exist (yet). If dehydrated fails
repeatedly, we may end up with a lot of old cert.csr, cert.pem and
privkey.pem files, so we really want to be able to clean them up.

Remove all files if the symlink is broken/missing, instead of skipping
those files.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2020-12-10 14:14:35 +01:00
Georg Altmann
835963fa6e make alpn-validation certificates and keys group readable (closes #754, fixes #753) 2020-12-10 14:00:26 +01:00
Daniel Molkentin
829aaeff2d Fix OCSP_FETCH with libressl
libressl did not pick up the implicit host header patches
of OpenSSL 1.1 even in version 3 and thus exhibits the same
behavior as OpenSSL 1.0.

Patch by Chen, Chih-Chia <pigfoot@gmail.com>

Fixes #778
2020-12-10 13:52:47 +01:00
Lukas Schauer
481aba7d7b remove quotes from per-cert-config vars to allow for spaces (fixes #789, closes #791) 2020-12-09 20:41:17 +01:00
Lukas Schauer
fbcaac89f9 changed method for parsing issuer cn, fixing compatibility with some openssl versions 2020-12-09 19:38:27 +01:00
Lukas Schauer
589e9f30b3 show available options if preferred chain is not found 2020-11-21 16:19:08 +01:00
Lukas Schauer
f2103340f3 fix spaces in sudo arguments 2020-11-20 17:09:04 +01:00
Lukas Schauer
c670c18299 added display-terms to changelog+readme 2020-11-13 20:49:18 +01:00
Daniel Molkentin
7cc9e2d07f add --display-terms to display the URL for the current ToS
Implements #649
2020-11-13 20:47:49 +01:00
Lukas Schauer
7dfde364a3 added support for requesting preferred-chain instead of default chain 2020-11-13 20:36:51 +01:00
Lukas Schauer
7d3288f428 one more \s -> [[:space:]] replacement 2020-09-30 11:35:06 +02:00
Jarkko Oranen
e69df6521b Replace \s with [[:space:]] for compatibility 2020-09-30 11:32:23 +02:00
Daniel Molkentin
8ddead4854 Complain about deactivated accounts 2020-09-28 01:15:48 +02:00
Daniel Molkentin
308b3ec750 implement account deactivation through --deactivate parameter
This is an updated version of https://github.com/lukas2511/dehydrated/files/2641548/dehydrated_add_deactivate_command.diff.txt

Fixes #216
2020-09-28 01:15:47 +02:00
Daniel Molkentin
39e1068a87 Don't require sudo before we know we really need it
Fixes #665
2020-09-27 22:26:20 +02:00
Daniel Molkentin
6d9fcd2588 Do not fail silently with invalid sudo user/group 2020-09-27 22:26:18 +02:00
Daniel Molkentin
60cb678e3b add more CAs, now that support for CA presets is implemented
- letsencrypt-test (LE staging CA)
- buypass (verified to work with the new json parsing, see #653)
- buypass-test analogously
2020-09-27 20:41:34 +02:00
Daniel Molkentin
5f8cfa50ba fix OS name detection
before applying heuristics, use PRETTY_NAME from os-release(3),
which reliably exists on all common linux distributions.

keep the /etc/issue parsing as fallback.
2020-09-27 20:35:18 +02:00
Lukas Schauer
b3abc41dbe tmpfix: log error if acmev1 validation is denied + fix unbound variable 2020-09-15 17:27:24 +02:00
Lukas Schauer
b3b2fee496 eab: use hex key instead of binary (fixes issue with nullbytes) 2020-09-14 18:59:41 +02:00
Lukas Schauer
416fd0fd1b do not fail on challenge in "processing" state (fixes #759) 2020-09-14 18:31:24 +02:00
Lukas Schauer
142c69dd90 fixed bad typo.. 2020-09-14 18:28:05 +02:00
Lukas Schauer
74c136905b readme+changelog 2020-09-14 18:24:01 +02:00
Lukas Schauer
5fc1175aef EAB + ZeroSSL support 2020-09-14 18:22:36 +02:00
Lukas Schauer
4b91fcf498 read boolean values from json 2020-09-14 18:19:08 +02:00
Lukas Schauer
11323d0727 removed accidental shebang 2020-09-14 18:18:35 +02:00
Lukas Schauer
a9a64c9fd0 use presets for some CAs instead of requiring full urls 2020-09-14 16:37:16 +02:00
Jason Francis
42a0fc9a5e fix tls-alpn-01 configuration example 2020-07-05 22:30:38 +02:00
Lukas Schauer
e119d9136b fixed some typos (fixes #725, fixes #741, fixes #740) 2020-07-05 22:29:57 +02:00
j-ed
275fb40ab4 removed tmp file in 'generate_alpn_certificate' function
Made sure that the temp file will be removed at the end of the function.
2020-07-05 21:41:12 +02:00
Lukas Schauer
7e92850957 fixed zsh compatibility 2020-07-05 04:13:11 +02:00
Lukas Schauer
bb5a1473d1 merged temporary json.sh into dehydrated, fixed authorization "pending" loop 2020-07-04 21:51:32 +02:00
Lukas Schauer
7f970b527c experimental json.sh support 2020-07-04 21:36:23 +02:00
Krayon
dc552c602e Use existing curl version var
Signed-off-by: Krayon <krayon.git@qdnx.org>
2020-04-28 21:36:52 +02:00
Lukas Schauer
9827a411b3 removed instructions for importing from "official" client (certbot) as it probably doesn't work anymore and there isn't really much use for it anyway 2020-04-28 21:29:24 +02:00
Lukas Schauer
4a55f93896 fix link to wiki in documentation (fixes #690) 2020-04-28 21:27:49 +02:00
Lukas Schauer
a07c8d14f6 reworked dependency check and moved it up a bit in code (fixes #715, resolves #717 again...) 2020-04-28 21:25:08 +02:00
Lukas Schauer
42047fdf11 added changelog 2020-04-28 21:10:22 +02:00
Lukas Schauer
76d7e31981 added note about newline encoded in accounts directory hashes (resolves #730) 2020-04-28 21:03:55 +02:00
Lukas Schauer
4fd4d4d3c2 temporarily store raw curl version output to fix check (fixes #717) 2020-04-28 20:58:46 +02:00
Lukas Schauer
229f7186a6 store errorcode while using KEEP_GOING (fixes #659) 2020-04-28 20:39:04 +02:00
Lukas Schauer
4b7a1e4ce6 report issues with hook scripts instead of silently exiting (fixes #733, fixes #686) 2020-04-28 20:13:03 +02:00
Lukas Schauer
871efe653b skip exit_hook in _exiterr if KEEP_GOING is enabled (fixes #686) 2020-04-28 18:36:02 +02:00
Rogdham
dbb0ef1ce1 Move from account ID to account URL
We store the account URL on account creation in the account_id.json file.

When reading the file, if the attribute is missing, we retrieve the account URL
from the CA ( https://tools.ietf.org/html/rfc8555#section-7.3.1 ) and edit the
file.

Per https://tools.ietf.org/html/rfc8555#section-7.3
> The server returns this account object in a 201 (Created) response, with the
> account URL in a Location header field.  The account URL is used as the "kid"
> value in the JWS authenticating subsequent requests by this account (see
> Section 6.2).  The account URL is also used for requests for management
> actions on this account, as described below.
2020-04-03 09:16:30 +02:00
Lukas Schauer
fcfb077a95 redirect output of cert expiry check (fixes #713) 2020-04-02 12:44:40 +02:00
Lukas Schauer
bc9344392a fixed typo (closes #712) 2020-04-02 12:23:09 +02:00
Lukas Schauer
5b7c898b63 only show order processing/pending message when waiting 2020-04-02 12:15:17 +02:00
Rogdham
58bd926e30 Don't assume order status to be valid
Per https://tools.ietf.org/html/rfc8555#section-7.1.3

> status (required, string):  The status of this order.  Possible values are
> "pending", "ready", "processing", "valid", and "invalid".  See Section 7.1.6.
2020-04-02 12:09:27 +02:00
Rogdham
c8333f5a56 Fix challenge response POST body in ACMEv2
Per https://tools.ietf.org/html/rfc8555#section-7.5.1

> The client indicates to the server that it is ready for the challenge
> validation by sending an empty JSON body ("{}") carried in a POST
> request to the challenge URL (not the authorization URL).
2020-03-30 21:34:43 +02:00
Lukas Schauer
307eaadddf updated notice about move 2020-01-30 22:51:25 +01:00
Lukas Schauer
dfffb1b88b added note about moving the repository 2020-01-30 01:45:17 +01:00
Lukas Schauer
e2eeaf7ec6 added funding.yml 2019-11-11 22:46:13 +01:00
Lukas Schauer
946e5712ba fixed small logic bug 2019-10-09 02:05:54 +02:00
Lukas Schauer
018254974c Merge tag 'v0.6.5' 2019-07-06 19:25:32 +02:00
Lukas Schauer
05eda91a2f release 0.6.5 (fixed apiv1 compatibility...) 2019-06-26 12:33:35 +02:00
Lukas Schauer
f60f2f81e8 release 0.6.5 (fixed apiv1 compatibility...) 2019-06-26 12:29:39 +02:00
Lukas Schauer
4f358e22f4 release 0.6.4 (fixed account id handling, again) 2019-06-25 15:28:09 +02:00
10 changed files with 646 additions and 162 deletions

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: lukas2511
custom: ["https://paypal.me/lukas2511", "http://www.amazon.de/registry/wishlist/1TUCFJK35IO4Q"]

View File

@@ -1,6 +1,38 @@
# Change Log
This file contains a log of major changes in dehydrated
## [0.7.0] - 2020-12-10
## Added
- Support for external account bindings
- Special support for ZeroSSL
- Support presets for some CAs instead of requiring URLs
- Allow requesting preferred chain (`--preferred-chain`)
- Added method to show CAs current terms of service (`--display-terms`)
- Allow setting path to domains.txt using cli arguments (`--domains-txt`)
- Added new cli command `--cleanupdelete` which deletes old files instead of archiving them
## Fixed
- No more silent failures on broken hook-scripts
- Better error-handling with KEEP_GOING enabled
- Check actual order status instead of assuming it's valid
- Don't include keyAuthorization in challenge validation (RFC compliance)
## Changed
- Using EC secp384r1 as default certificate type
- Use JSON.sh to parse JSON
- Use account URL instead of account ID (RFC compliance)
- Dehydrated now has a new home: https://github.com/dehydrated-io/dehydrated
- Added `OCSP_FETCH` and `OCSP_DAYS` to per-certificate configurable options
- Cleanup now also removes dangling symlinks
## [0.6.5] - 2019-06-26
## Fixed
- Fixed broken APIv1 compatibility from last update
## [0.6.4] - 2019-06-25
## Changed
- Fetch account ID from Location header instead of account json
## [0.6.3] - 2019-06-25
## Changed
- OCSP refresh interval is now configurable

View File

@@ -1,5 +1,8 @@
# dehydrated [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=23P9DSJBTY7C8)
Quick note: dehydrated moved, the license will NOT change, and I will still take care of the project.
See https://lukas.im/2020/01/30/selling-dehydrated/index.html for more details.
![](docs/logo.jpg)
Dehydrated is a client for signing certificates with an ACME-server (e.g. Let's Encrypt) implemented as a relatively simple (zsh-compatible) bash-script.
@@ -49,12 +52,15 @@ Default command: help
Commands:
--version (-v) Print version information
--display-terms Display current terms of service
--register Register account key
--account Update account contact information
--cron (-c) Sign/renew non-existent/changed/expiring certificates.
--signcsr (-s) path/to/csr.pem Sign a given CSR, output CRT on stdout (advanced usage)
--revoke (-r) path/to/cert.pem Revoke specified certificate
--deactivate Deactivate account
--cleanup (-gc) Move unused certificate files to archive directory
--cleanup-delete (-gcd) Deletes (!) unused certificate files
--help (-h) Show help text
--env (-e) Output configuration variables for use in other scripts
@@ -64,6 +70,7 @@ Parameters:
--ipv4 (-4) Resolve names to IPv4 addresses only
--ipv6 (-6) Resolve names to IPv6 addresses only
--domain (-d) domain.tld Use specified domain name(s) instead of domains.txt entry (one certificate!)
--ca url/preset Use specified CA URL or preset
--alias certalias Use specified name for certificate directory (and per-certificate config) instead of the primary domain (only used if --domain is specified)
--keep-going (-g) Keep going after encountering an error while creating/renewing multiple certificates in cron mode
--force (-x) Force renew of certificate even if it is longer valid than value in RENEW_DAYS
@@ -71,8 +78,10 @@ Parameters:
--lock-suffix example.com Suffix lockfile name with a string (useful for with -d)
--ocsp Sets option in CSR indicating OCSP stapling to be mandatory
--privkey (-p) path/to/key.pem Use specified private key instead of account key (useful for revocation)
--domains-txt path/to/domains.txt Use specified domains.txt instead of default/configured one
--config (-f) path/to/config Use specified config file
--hook (-k) path/to/hook.sh Use specified script for hooks
--preferred-chain issuer-cn Use alternative certificate chain identified by issuer CN
--out (-o) certs/directory Output certificates into the specified directory
--alpn alpn-certs/directory Output alpn verification certificates into the specified directory
--challenge (-t) http-01|dns-01 Which challenge should be used? Currently http-01 and dns-01 are supported

File diff suppressed because it is too large Load Diff

View File

@@ -28,4 +28,4 @@ Or when you do have a DNS API, pass the details accordingly to achieve the same
You can delete the TXT record when called with operation `clean_challenge`, when $2 is also the domain name.
Here are some examples: [Examples for DNS-01 hooks](https://github.com/lukas2511/dehydrated/wiki/Examples-for-DNS-01-hooks)
Here are some examples: [Examples for DNS-01 hooks](https://github.com/dehydrated-io/dehydrated/wiki)

View File

@@ -10,10 +10,10 @@
# Default values of this config are in comments #
########################################################
# Which user should dehydrated run as? This will be implictly enforced when running as root
# Which user should dehydrated run as? This will be implicitly enforced when running as root
#DEHYDRATED_USER=
# Which group should dehydrated run as? This will be implictly enforced when running as root
# Which group should dehydrated run as? This will be implicitly enforced when running as root
#DEHYDRATED_GROUP=
# Resolve names to addresses of IP version only. (curl)
@@ -21,8 +21,10 @@
# default: <unset>
#IP_VERSION=
# Path to certificate authority (default: https://acme-v02.api.letsencrypt.org/directory)
#CA="https://acme-v02.api.letsencrypt.org/directory"
# URL to certificate authority or internal preset
# Presets: letsencrypt, letsencrypt-test, zerossl, buypass, buypass-test
# default: letsencrypt
#CA="letsencrypt"
# Path to old certificate authority
# Set this value to your old CA value when upgrading from ACMEv1 to ACMEv2 under a different endpoint.
@@ -100,7 +102,7 @@
#PRIVATE_KEY_ROLLOVER="no"
# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
#KEY_ALGO=rsa
#KEY_ALGO=secp384r1
# E-mail to use during the registration (default: <unset>)
#CONTACT_EMAIL=
@@ -125,3 +127,6 @@
# ACME API version (default: auto)
#API=auto
# Preferred issuer chain (default: <unset> -> uses default chain)
#PREFERRED_CHAIN=

View File

@@ -60,7 +60,7 @@ sync_cert() {
# The path of the file containing the certificate signing request.
# Simple example: sync the files before symlinking them
# sync "${KEYFILE}" "${CERTFILE} "${FULLCHAINFILE}" "${CHAINFILE}" "${REQUESTFILE}"
# sync "${KEYFILE}" "${CERTFILE}" "${FULLCHAINFILE}" "${CHAINFILE}" "${REQUESTFILE}"
}
deploy_cert() {
@@ -177,7 +177,7 @@ generate_csr() {
# This hook is called before any certificate signing operation takes place.
# It can be used to generate or fetch a certificate signing request with external
# tools.
# The output should be just the cerificate signing request formatted as PEM.
# The output should be just the certificate signing request formatted as PEM.
#
# Parameters:
# - DOMAIN

View File

@@ -1,3 +0,0 @@
# Import
If you want to import existing keys from the official letsencrypt client have a look at [Import from official letsencrypt client](https://github.com/lukas2511/dehydrated/wiki/Import-from-official-letsencrypt-client).

View File

@@ -17,6 +17,7 @@ Currently supported options:
- WELLKNOWN
- OPENSSL_CNF
- RENEW_DAYS
- PREFERRED_CHAIN
## DOMAINS_D

View File

@@ -15,18 +15,16 @@ Your config should look something like this:
```nginx
stream {
server {
map $ssl_preread_alpn_protocols $tls_port {
~\bacme-tls/1\b 10443;
default 443;
}
map $ssl_preread_alpn_protocols $tls_port {
~\bacme-tls/1\b 10443;
default 443;
}
server {
listen 443;
listen [::]:443;
proxy_pass 10.13.37.42:$tls_port;
ssl_preread on;
}
server {
listen 443;
listen [::]:443;
proxy_pass 10.13.37.42:$tls_port;
ssl_preread on;
}
}
```