diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-09-01 00:15:31 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-09-11 11:10:21 +0200 |
commit | a9468b422b6df2349a3f4d1451c9302c3d77011b (patch) | |
tree | b1391630c8bdbc2144551f09a1dc73749806c68c /tests/containers.scm | |
parent | 218f6eccafa8172221cf7efd5262107233e7a587 (diff) | |
download | guix-a9468b422b6df2349a3f4d1451c9302c3d77011b.tar.gz |
substitute: Download from unauthorized sources that provide the right content.
This allows substitutes to be downloaded from unauthorized servers, as long as they advertise the same hash and references as one of the authorized servers. * guix/scripts/substitute.scm (assert-valid-narinfo): Remove. (valid-narinfo?): Add #:verbose?. Handle each case of 'signature-case'. (equivalent-narinfo?): New procedure. (lookup-narinfos/diverse): Add 'authorized?' parameter and honor it. [select-hit]: New procedure. (lookup-narinfo): Add 'authorized?' parameter and pass it. (process-query): Adjust callers accordingly. (process-substitution): Remove call to 'assert-valid-narinfo'. Check whether 'lookup-narinfo' returns true and call 'leave' if not. * tests/substitute.scm (%main-substitute-directory) (%alternate-substitute-directory): New variables. (call-with-narinfo): Make 'narinfo-directory' a parameter. Call 'mkdir-p' to create it. Change unwind handler to check whether CACHE-DIRECTORY exists before deleting it. (with-narinfo*): New macro. ("substitute, no signature") ("substitute, invalid hash") ("substitute, unauthorized key"): Change expected error message to "no valid substitute". ("substitute, unauthorized narinfo comes first") ("substitute, unsigned narinfo comes first") ("substitute, first narinfo is unsigned and has wrong hash") ("substitute, first narinfo is unsigned and has wrong refs") ("substitute, unsigned narinfo comes first") ("substitute, two invalid narinfos"): New tests. * doc/guix.texi (Substitutes): Explain the new behavior.
Diffstat (limited to 'tests/containers.scm')
0 files changed, 0 insertions, 0 deletions