Age | Commit message (Expand) | Author |
2022-02-14 | git-authenticate: Ensure the target is a descendant of the introductory commit....Fixes a bug whereby authentication of a commit *not* descending from the
introductory commit could succeed, provided the commit verifies the
authorization invariant.
In the example below, A is a common ancestor of the introductory commit
I and of commit X. Authentication of X would succeed, even though it is
not a descendant of I, as long as X is authorized according to the
'.guix-authorizations' in A:
X I
\ /
A
This is because, 'authenticate-repository' would not check whether X
descends from I, and the call (commit-difference X I) would return X.
In practice that only affects forks because it means that ancestors of
the introductory commit already contain a '.guix-authorizations' file.
* guix/git-authenticate.scm (authenticate-repository): Add call to
'commit-descendant?'.
* tests/channels.scm ("authenticate-channel, not a descendant of introductory commit"):
New test.
* tests/git-authenticate.scm ("authenticate-repository, target not a descendant of intro"):
New test.
* tests/guix-git-authenticate.sh: Expect earlier test to fail since
9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604 is not a descendant of
$intro_commit. Add new test targeting an ancestor of the introductory
commit, and another test targeting the v1.2.0 commit.
* doc/guix.texi (Specifying Channel Authorizations): Add a sentence.
| Ludovic Courtès |
2022-02-14 | git-authenticate: Test introductory commit signature verification....These tests mimic similar tests already in 'tests/channels.scm', but
without using the higher-level 'authenticate-channel'.
* tests/git-authenticate.scm ("introductory commit, valid signature")
("introductory commit, missing signature")
("introductory commit, wrong signature"): New tests.
| Ludovic Courtès |
2021-12-22 | tests: Move keys into ./tests/keys/ and add a third ed25519 key....The third key will be used in an upcoming commit.
Rename public keys to .pub.
* guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable.
(%ed25519-3-secret-key-file): New variable.
(%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file.
(%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file.
* tests/keys/ed25519-3.key: New file.
* tests/keys/ed25519-3.sec: New file.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| Attila Lendvai |
2020-06-28 | tests: Allow 'tests/git-authenticate.scm' to run when git/gpg is missing....Fixes <https://bugs.gnu.org/42077>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.
The typo was introduced in 7b06781a58326f251c4af6340379d68e3cb98adb.
* tests/git-authenticate.scm <top level>: Remove call to 'which'
around (gpg+git-available?).
| Ludovic Courtès |
2020-06-20 | tests: Skip tests that requires gpg when gpg is unavailable....Partly fixes <https://bugs.gnu.org/41932>.
Reported by Simen Endsjø <simendsjo@gmail.com>.
* tests/git-authenticate.scm ("signed commits, SHA1 signature"): Use
'gpg+git-available?' in skip guard.
| Ludovic Courtès |
2020-06-16 | tests: Move OpenPGP helpers to (guix tests gnupg)....* tests/git-authenticate.scm (key-id): Remove.
(%ed25519-public-key-file, %ed25519-secret-key-file)
(%ed25519bis-public-key-file, %ed25519bis-secret-key-file)
(read-openpgp-packet, key-fingerprint): Move to...
* guix/tests/gnupg.scm: ... here.
| Ludovic Courtès |
2020-06-12 | git-authenticate: Disallow SHA1 (and MD5) signatures....* guix/git-authenticate.scm (commit-signing-key): Add
#:disallowed-hash-algorithms and honor it.
(authenticate-commit)[recent-commit?]: New variable.
Pass #:disallowed-hash-algorithms to 'commit-signing-key'.
* tests/git-authenticate.scm ("signed commits, SHA1 signature"): New test.
| Ludovic Courtès |
2020-06-07 | git-authenticate: Prevent removal of '.guix-authorizations'....* guix/git-authenticate.scm (commit-authorized-keys)
[parents-have-authorizations-file?, assert-parents-lack-authorizations]:
New procedures.
Use the latter before returning DEFAULT-AUTHORIZATIONS.
* guix/git.scm (false-if-git-not-found): Export.
* guix/tests/git.scm (populate-git-repository): Add 'remove' clause.
* tests/git-authenticate.scm ("signed commits, .guix-authorizations removed"):
New test.
| Ludovic Courtès |
2020-06-05 | git-authenticate: Add tests....* guix/tests/git.scm (call-with-environment-variables)
(with-environment-variables): Remove.
* guix/tests/git.scm (populate-git-repository): Add clauses for signed
commits and signed merges.
* guix/tests/gnupg.scm: New file.
* tests/git-authenticate.scm: New file.
* tests/ed25519bis.key, tests/ed25519bis.sec: New files.
* Makefile.am (dist_noinst_DATA): Add 'guix/tests/gnupg.scm'.
(SCM_TESTS): Add 'tests/git-authenticate.scm'.
(EXTRA_DIST): Add tests/ed25519bis.{key,sec}.
| Ludovic Courtès |