daemon: Simplify interface with 'guix authenticate'.
authorLudovic Courtès <ludo@gnu.org>
Tue, 8 Sep 2020 13:00:29 +0000 (15:00 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 11 Sep 2020 15:53:58 +0000 (17:53 +0200)
commit6dd8ffc57420ee2f6f19e79e41028e78fe9e6a7e
treee416113b3ef643a6b34ed8b7fe4d317792ff66a1
parent7a68d3ccadc7391b97e94582301f3dfaf51a3179
daemon: Simplify interface with 'guix authenticate'.

There's no reason at this point to mimic the calling convention of the
'openssl' command.

* nix/libstore/local-store.cc (LocalStore::exportPath): Add only "sign"
and HASH to ARGS.  Remove 'tmpDir' and 'hashFile'.
(LocalStore::importPath): Add only "verify" and SIGNATURE to
* guix/scripts/authenticate.scm (guix-authenticate): Adjust
accordingly; remove the OpenSSL-style clauses.
(read-hash-data): Remove.
(sign-with-key): Replace 'port' with 'sha256' and adjust accordingly.
(validate-signature): Export SIGNATURE to be a canonical sexp.
* tests/guix-authenticate.sh: Adjust tests accordingly.
guix/scripts/authenticate.scm
nix/libstore/local-store.cc
tests/guix-authenticate.sh