a9468b422b
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. |
||
---|---|---|
.. | ||
base16.scm | ||
base32.scm | ||
base64.scm | ||
bournish.scm | ||
build-utils.scm | ||
builders.scm | ||
cache.scm | ||
challenge.scm | ||
combinators.scm | ||
containers.scm | ||
cpan.scm | ||
cpio.scm | ||
cran.scm | ||
crate.scm | ||
cve-sample.xml | ||
cve.scm | ||
derivations.scm | ||
discovery.scm | ||
elpa.scm | ||
file-systems.scm | ||
gem.scm | ||
gexp.scm | ||
gnu-maintenance.scm | ||
grafts.scm | ||
graph.scm | ||
gremlin.scm | ||
guix-archive.sh | ||
guix-authenticate.sh | ||
guix-build.sh | ||
guix-daemon.sh | ||
guix-download.sh | ||
guix-environment-container.sh | ||
guix-environment.sh | ||
guix-gc.sh | ||
guix-graph.sh | ||
guix-hash.sh | ||
guix-lint.sh | ||
guix-package-net.sh | ||
guix-package.sh | ||
guix-register.sh | ||
guix-system.sh | ||
hackage.scm | ||
hash.scm | ||
import-utils.scm | ||
lint.scm | ||
modules.scm | ||
monads.scm | ||
nar.scm | ||
pack.scm | ||
packages.scm | ||
pk-crypto.scm | ||
pki.scm | ||
profiles.scm | ||
publish.scm | ||
pypi.scm | ||
records.scm | ||
scripts-build.scm | ||
scripts.scm | ||
search-paths.scm | ||
services.scm | ||
sets.scm | ||
signing-key.pub | ||
signing-key.sec | ||
size.scm | ||
snix.scm | ||
store.scm | ||
substitute.scm | ||
syscalls.scm | ||
system.scm | ||
test.drv | ||
texlive.scm | ||
ui.scm | ||
union.scm | ||
upstream.scm | ||
utils.scm | ||
workers.scm | ||
zlib.scm |