guix/tests
Ludovic Courtès cdea30e061 substitute-binary: Defer narinfo authentication and authorization checks.
* guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp):
  Catch 'gcry-error' around 'string->canonical-sexp' call, and re-raise
  as a SRFI-35 &message and &nar-signature-error.
  (narinfo-maker): Handle when SIGNATURE is #f or an invalid canonical
  sexp.
  (&nar-signature-error, &nar-invalid-hash-error): New variables.
  (assert-valid-signature): Use them.  Expect 'signature' to be a
  canonical sexp.
  (read-narinfo): Remove authentication and authorization checks.
  (%signature-line-rx): New variable.
  (assert-valid-narinfo, valid-narinfo?): New procedures.
  (guix-substitute-binary): Wrap body in 'with-error-handling'.
  [valid?]: New procedure.
  <--query>: Show only store items of narinfos that match
  'valid-narinfo?'.
  <--substitute>: Call 'assert-valid-narinfo'.
* tests/substitute-binary.scm (test-error*): Use 'test-equal'.
  (%keypair): Remove.
  (%public-key, %private-key): Load from signing-key.{pub,sec}.
  (signature-body): Add #:public-key parameter.
  (call-with-narinfo): New procedure.
  (with-narinfo): New macro.
  ("corrupt signature data", "unauthorized public key", "invalid
  signature"): Make the first argument to 'assert-valid-signature' a
  canonical sexp.
  ("invalid hash", "valid read-narinfo", "valid write-narinfo"):
  Remove.
  ("query narinfo with invalid hash", "query narinfo signed with
  authorized key", "query narinfo signed with unauthorized key",
  "substitute, invalid hash", "substitute, unauthorized key"): New
  tests.
2014-03-30 22:32:11 +02:00
..
base32.scm Move `sha256' to (guix hash). 2013-07-01 23:28:21 +02:00
base64.scm substitute-binary: Support the Signature field of a narinfo file. 2014-03-30 12:02:10 +02:00
build-utils.scm Augment `.dir-locals.el'. 2013-02-01 13:16:45 +01:00
builders.scm derivations: 'derivation' and related procedures return a single value. 2013-09-18 18:49:53 +02:00
derivations.scm tests: Make sure substitutes are usable when we need them. 2014-03-22 22:57:10 +01:00
guix-archive.sh tests: Make sure 'guix archive --import' succeeds. 2014-03-29 22:59:46 +01:00
guix-authenticate.sh authenticate: Support reading the hash or key from stdin. 2014-03-22 22:57:10 +01:00
guix-build.sh derivations: Use more keyword parameters for 'build-expression->derivation'. 2013-12-04 16:07:53 +01:00
guix-daemon.sh daemon: Add tests for substitutes and --no-substitutes. 2014-03-27 23:56:47 +01:00
guix-download.sh Replace individual scripts with master 'guix' script. 2013-02-16 22:17:37 -05:00
guix-gc.sh guix gc: Add --references' and --referrers'. 2013-02-27 23:16:00 +01:00
guix-hash.sh guix hash: Add '--recursive'. 2014-02-21 23:49:52 +01:00
guix-package.sh tests: Adjust to recent Binutils change. 2014-01-25 17:23:23 +01:00
guix-register.sh build: Fix test failures due to the nix -> guix directory name change. 2014-03-17 23:30:42 +01:00
hash.scm hash: Add 'open-sha256-input-port', for Guile > 2.0.9. 2014-01-24 00:01:49 +01:00
monads.scm monads: Add 'text-file*'. 2014-02-03 23:20:49 +01:00
nar.scm nar: Produce archives with files sorted in C collation order. 2014-02-21 23:49:53 +01:00
packages.scm build: Skip one 'package-source-derivation' test when networking is missing. 2013-12-11 13:55:49 +01:00
pk-crypto.scm pk-crypto: Don't use Ed25519 when libgcrypt is older than 1.6.0. 2014-03-20 23:06:47 +01:00
pki.scm Add (guix pki). 2013-12-29 15:57:24 +01:00
profiles.scm guix package: Allow removal of a specific package output. 2013-11-01 23:21:01 +01:00
records.scm records: define-record-type*: Field bindings are bound with 'let*'. 2013-10-15 23:31:22 +02:00
signing-key.pub daemon: Implement signed archive import/export. 2013-12-20 17:17:42 +01:00
signing-key.sec daemon: Implement signed archive import/export. 2013-12-20 17:17:42 +01:00
snix.scm Augment `.dir-locals.el'. 2013-02-01 13:16:45 +01:00
store.scm tests: Test recovery from 'valid-path?' RPCs with an invalid parameter. 2014-03-19 00:00:29 +01:00
substitute-binary.scm substitute-binary: Defer narinfo authentication and authorization checks. 2014-03-30 22:32:11 +02:00
test.drv Add unit test for derivation parsing and output. 2012-04-19 23:09:55 +02:00
ui.scm ui: Factorize package specification parsing. 2013-11-01 23:21:00 +01:00
union.scm derivations: Use more keyword parameters for 'build-expression->derivation'. 2013-12-04 16:07:53 +01:00
utils.scm utils: Add 'call-with-decompressed-port' and 'call-with-compressed-output-port'. 2014-03-24 22:15:29 +01:00