Skip to content

Commit f33b7c6

Browse files
committed
Update to dehydrated v0.4.0 to fix registering w/Let's Encrypt new terms
1 parent 87d7699 commit f33b7c6

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
22
BUILD_DIR?=$(ROOT_DIR)/build
33

4-
DEHYDRATED_VERSION:=v0.3.1
4+
DEHYDRATED_VERSION:=v0.4.0
55
LUA_RESTY_SHELL_VERSION:=955243d70506c21e7cc29f61d745d1a8a718994f
66
SOCKPROC_VERSION:=fc8ad3f15a7b2cf2eaf39663b90010efc55e207c
77

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This OpenResty plugin automatically and transparently issues SSL certificates fr
1212

1313
This uses the `ssl_certificate_by_lua` functionality in OpenResty 1.9.7.2+.
1414

15+
By using lua-resty-auto-ssl to register SSL certificates with Let's Encrypt, you agree to the [Let's Encrypt Subscriber Agreement](https://letsencrypt.org/repository/).
16+
1517
## Status
1618

1719
Used in production (but the internal APIs might still be in flux).

bin/letsencrypt_hooks

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
set -e -u
1111

12-
function deploy_challenge {
12+
deploy_challenge() {
1313
local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}"
1414

1515
curl --silent --show-error --fail -XPOST \
@@ -20,7 +20,7 @@ function deploy_challenge {
2020
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-challenge" || { echo "hook request (deploy_challenge) failed" 1>&2; exit 1; }
2121
}
2222

23-
function clean_challenge {
23+
clean_challenge() {
2424
local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}"
2525

2626
curl --silent --show-error --fail -XPOST \
@@ -31,7 +31,7 @@ function clean_challenge {
3131
"http://127.0.0.1:$HOOK_SERVER_PORT/clean-challenge" || { echo "hook request (clean_challenge) failed" 1>&2; exit 1; }
3232
}
3333

34-
function deploy_cert {
34+
deploy_cert() {
3535
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}"
3636

3737
curl --silent --show-error --fail -XPOST \
@@ -43,8 +43,24 @@ function deploy_cert {
4343
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-cert" || { echo "hook request (deploy_cert) failed" 1>&2; exit 1; }
4444
}
4545

46-
function unchanged_cert {
46+
unchanged_cert() {
4747
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
4848
}
4949

50+
invalid_challenge() {
51+
local DOMAIN="${1}" RESPONSE="${2}"
52+
echo "Invalid challenge: DOMAIN=${DOMAIN} RESPONSE=${RESPONSE}"
53+
exit 1
54+
}
55+
56+
request_failure() {
57+
local STATUSCODE="${1}" REASON="${2}" REQTYPE="${3}"
58+
echo "Failure: STATUSCODESTATUSCODE} REASON=${REASON} REQTYPE=${REQTYPE}"
59+
exit 1
60+
}
61+
62+
exit_hook() {
63+
:
64+
}
65+
5066
HANDLER=$1; shift; $HANDLER "$@"

lib/resty/auto-ssl/ssl_providers/lets_encrypt.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function _M.issue_cert(auto_ssl_instance, domain)
3030
local command = env_vars .. " " ..
3131
lua_root .. "/bin/resty-auto-ssl/dehydrated " ..
3232
"--cron " ..
33+
"--accept-terms " ..
3334
"--no-lock " ..
3435
"--domain " .. domain .. " " ..
3536
"--challenge http-01 " ..

0 commit comments

Comments
 (0)