Skip to content

Commit b5b6bf4

Browse files
committed
uacme: apply upstream changes
updating with changes from outside (acme-common/uacme) version/profile support/key rotation option Signed-off-by: Seo Suchan <tjtncks@gmail.com>
1 parent 1837420 commit b5b6bf4

File tree

4 files changed

+61
-5
lines changed

4 files changed

+61
-5
lines changed

net/acme-common/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=acme-common
11-
PKG_VERSION:=1.5.1
11+
PKG_VERSION:=1.5.2
1212

1313
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
1414
PKG_LICENSE:=GPL-3.0-only

net/uacme/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ define Package/uacme/install
111111

112112
$(INSTALL_BIN) ./files/hook.sh $(1)/usr/lib/acme/hook
113113
$(INSTALL_BIN) ./files/httpchalhook.sh $(1)/usr/lib/acme/client/httpchalhook.sh
114+
$(INSTALL_BIN) ./files/dns_persist.sh $(1)/usr/lib/acme/client/dns_persist.sh
114115
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uacme $(1)/usr/sbin/uacme
115116
endef
116117

@@ -128,9 +129,10 @@ define Package/uacme-dnsapi-adapter/install
128129
$(INSTALL_DIR) \
129130
$(1)/usr/lib/acme/client
130131

131-
$(INSTALL_BIN) ./files/dnschalhook.sh $(1)/usr/lib/acme/client/dnschalhook.sh
132-
$(INSTALL_BIN) ./files/dnsapi_helper.sh $(1)/usr/lib/acme/client/dnsapi_helper.sh
132+
$(INSTALL_BIN) ./files/dnschalhook.sh $(1)/usr/lib/acme/client/dnschalhook.sh
133+
$(INSTALL_BIN) ./files/dnsapi_helper.sh $(1)/usr/lib/acme/client/dnsapi_helper.sh
133134
endef
134135

135136
$(eval $(call BuildPackage,uacme))
136137
$(eval $(call BuildPackage,uacme-ualpn))
138+
$(eval $(call BuildPackage,uacme-dnsapi-adapter))

net/uacme/files/dns_persist.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
# Copyright (C) 2019-2024 Nicola Di Lieto <nicola.dilieto@gmail.com>
3+
#
4+
# This file is part of uacme.
5+
#
6+
# uacme is free software: you can redistribute it and/or modify it
7+
# under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# uacme is distributed in the hope that it will be useful, but
12+
# WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
# General Public License for more details.
15+
#
16+
# Part of this is copied from acme.sh
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
21+
# noop challange 'solver' for challenge type select
22+
23+
ARGS=5
24+
E_BADARGS=85
25+
LOG_TAG=acme-uacme-dnshook
26+
27+
if test $# -ne "$ARGS"
28+
then
29+
echo "Usage: $(basename "$0") method type ident token auth" 1>&2
30+
exit $E_BADARGS
31+
fi
32+
33+
METHOD=$1
34+
TYPE=$2
35+
IDENT=$3
36+
TOKEN=$4
37+
AUTH=$5
38+
39+
if [ "$TYPE" != "dns-persist-01" ]; then
40+
echo "skipping $TYPE" 1>&2
41+
exit 1
42+
fi
43+
44+
if [ "$METHOD" == "failed" ]; then
45+
echo "Failed dns-persist-01 challange for $IDENT, did you put right validation record?"
46+
fi
47+
48+
exit 0

net/uacme/files/hook.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ get)
8585
fi
8686
set --
8787
[ "$debug" = 1 ] && set -- "$@" -v
88-
#uacme doesn't rotate privkey
8988
case $key_type in
9089
ec*)
9190
keylength=${key_type#ec}
@@ -130,6 +129,10 @@ get)
130129
set -- "$@" --days "$days"
131130
fi
132131

132+
if [ "$cert_profile" ]; then
133+
set -- "$@" --profile "$cert_profile"
134+
fi
135+
133136
# uacme handles challange select by hook script
134137
case "$validation_method" in
135138
"alpn")
@@ -151,6 +154,9 @@ get)
151154
export dns_wait
152155
fi
153156
;;
157+
"dns-persist")
158+
set -- "$@" -h "$HOOKDIR/client/dns_persist.sh"
159+
;;
154160
"standalone")
155161
set -- "$@" --standalone --listen-v6
156162
log err "standalone server is not implmented for uacme"
@@ -173,7 +179,7 @@ get)
173179

174180
log info "$ACME $*"
175181
trap '$NOTIFY issue-failed;exit 1' INT
176-
"$ACME" "$@" 2>&1
182+
"$ACME" "$@" -k 2>&1
177183
status=$?
178184
trap - INT
179185

0 commit comments

Comments
 (0)