diff options
| author | rnhmjoj <rnhmjoj@inventati.org> | 2020-10-26 13:07:49 +0100 |
|---|---|---|
| committer | rnhmjoj <rnhmjoj@inventati.org> | 2020-10-26 13:53:09 +0100 |
| commit | 22515f10eb5d368b9cdfe4ff8dcc3e3dc505537c (patch) | |
| tree | 07918d7980728925a3bce96639316c0c7a816cd1 | |
| parent | Merge pull request #101704 from worldofpeace/backport-101516 (diff) | |
| download | nixpkgs-22515f10eb5d368b9cdfe4ff8dcc3e3dc505537c.tar.gz | |
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.
(cherry picked from commit 9e04bba0af3c3d39fe004d55ddb6601ca4caa077)
| -rw-r--r-- | nixos/modules/services/networking/dnscrypt-wrapper.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/dnscrypt-wrapper.nix b/nixos/modules/services/networking/dnscrypt-wrapper.nix index b9333cd19a2a..ee7e9b0454de 100644 --- a/nixos/modules/services/networking/dnscrypt-wrapper.nix +++ b/nixos/modules/services/networking/dnscrypt-wrapper.nix @@ -55,7 +55,10 @@ let rotateKeys = '' # check if keys are not expired keyValid() { - fingerprint=$(dnscrypt-wrapper --show-provider-publickey | awk '{print $(NF)}') + fingerprint=$(dnscrypt-wrapper \ + --show-provider-publickey \ + --provider-publickey-file=${publicKey} \ + | awk '{print $(NF)}') dnscrypt-proxy --test=${toString (cfg.keys.checkInterval + 1)} \ --resolver-address=127.0.0.1:${toString cfg.port} \ --provider-name=${cfg.providerName} \ |
