aboutsummaryrefslogtreecommitdiffstats
path: root/tests/accountd-remote
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-20 22:05:18 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-21 00:19:51 +0100
commit74c0a11722cf1e01b9a9834e89a07b55eaf01080 (patch)
tree8f12146e2a5b402fc6b846259c1be02ed2f10edc /tests/accountd-remote
parentcf3d42c066d2f54d4a57aa38907a7c6c7d06aeb6 (diff)
lacme-accountd: new setting 'logfile' to log signature requests.
Prefixed with a timestamp.
Diffstat (limited to 'tests/accountd-remote')
-rw-r--r--tests/accountd-remote11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/accountd-remote b/tests/accountd-remote
index bd5d99f..05850c2 100644
--- a/tests/accountd-remote
+++ b/tests/accountd-remote
@@ -31,20 +31,25 @@ lacme newOrder --debug 2>"$STDERR" || fail # intentionally use --debug, ssh shou
test /etc/lacme/simpletest.rsa.crt -nt /etc/lacme/simpletest.rsa.key
# and now with an authorized_keys(5) restriction
-sed -ri "s|^[^#]|restrict,from=\"127.0.0.1\",command=\"/usr/bin/lacme-accountd --stdio\" &|" ~lacme-account/.ssh/authorized_keys
+sed -ri "s|^[^#]|restrict,from=\"127.0.0.1\",command=\"/usr/bin/lacme-accountd --quiet --stdio\" &|" ~lacme-account/.ssh/authorized_keys
rm -vf /etc/lacme/simpletest.rsa.crt
! lacme newOrder 2>"$STDERR" || fail # --config= (and --debug) should be ignored
grepstderr -Fxq "Error: 'privkey' is not specified"
grepstderr -Fxq "[simpletest-rsa] Error: Couldn't issue X.509 certificate!"
-install -olacme-account -glacme-account -Ddm0700 ~lacme-account/.config/lacme
+install -olacme-account -glacme-account -Ddm0700 -- \
+ ~lacme-account/.config/lacme ~lacme-account/.local/share/lacme
mv -t ~lacme-account/.config/lacme /etc/lacme/account.key
cat >~lacme-account/.config/lacme/lacme-accountd.conf <<-EOF
privkey = file:%E/lacme/account.key
+ logfile = %h/.local/share/lacme/accountd.log
EOF
-lacme newOrder || fail
+lacme newOrder
test /etc/lacme/simpletest.rsa.crt -nt /etc/lacme/simpletest.rsa.key
+# ensure signature requests are logged
+grep -F ">>> Incoming signature request for " ~lacme-account/.local/share/lacme/accountd.log
+
# vim: set filetype=sh :