nixos/dnscrypt-wrapper: fix key rotation script
Fix an error in the validation code when the public key is in a
nonstandard location. The check command fails and the key is
incorrectly assumed to be expiring.
commit9e04bba0af3c3d39fe004d55ddb6601ca4caa077
authorrnhmjoj <rnhmjoj@inventati.org>
dateMon 26 Oct 2020, 13:07 (6 years ago)
parent81573a6
nixos/modules/services/networking/dnscrypt-wrapper.nix+4−1
@@ -55,7 +55,10 @@ let
5555 rotateKeys = ''
5656 # check if keys are not expired
5757 keyValid() {
58− fingerprint=$(dnscrypt-wrapper --show-provider-publickey | awk '{print $(NF)}')
58+ fingerprint=$(dnscrypt-wrapper \
59+ --show-provider-publickey \
60+ --provider-publickey-file=${publicKey} \
61+ | awk '{print $(NF)}')
5962 dnscrypt-proxy --test=${toString (cfg.keys.checkInterval + 1)} \
6063 --resolver-address=127.0.0.1:${toString cfg.port} \
6164 --provider-name=${cfg.providerName} \