<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/git-authenticate.scm, branch master</title>
<subtitle>GNU transactional package management, distribution, deployment, and more!
</subtitle>
<id>http://git.rostovtsev.org/guix/atom?h=master</id>
<link rel='self' href='http://git.rostovtsev.org/guix/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/'/>
<updated>2023-09-26T15:36:59Z</updated>
<entry>
<title>tests: Assume ‘git’ is always available.</title>
<updated>2023-09-26T15:36:59Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-09-11T14:04:31Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=ba21eeb565fe414b3647173068a0f3eadd174c06'/>
<id>urn:sha1:ba21eeb565fe414b3647173068a0f3eadd174c06</id>
<content type='text'>
* tests/channels.scm (gpg+git-available?): Check for ‘gpg-command’
only.
Remove all ‘test-skip’ statements.
* tests/derivations.scm: Likewise.
* tests/git-authenticate.scm: Likewise.
* tests/git.scm: Likewise.
* tests/import-git.scm: Likewise.
</content>
</entry>
<entry>
<title>git-authenticate: Ensure the target is a descendant of the introductory commit.</title>
<updated>2022-02-14T10:23:08Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-01-28T16:20:43Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=ca87601dd97dd9d356409827802eb0f8a3a535f0'/>
<id>urn:sha1:ca87601dd97dd9d356409827802eb0f8a3a535f0</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>git-authenticate: Test introductory commit signature verification.</title>
<updated>2022-02-14T10:23:07Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-01-28T11:01:12Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=36cb04df96623ffe8f1074172a4ed9e51bcf6e3a'/>
<id>urn:sha1:36cb04df96623ffe8f1074172a4ed9e51bcf6e3a</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>tests: Move keys into ./tests/keys/ and add a third ed25519 key.</title>
<updated>2021-12-22T09:53:19Z</updated>
<author>
<name>Attila Lendvai</name>
<email>attila@lendvai.name</email>
</author>
<published>2021-12-21T21:56:10Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=9ebc9ca070a21ba0aeb3f61202a8071bb250ccc8'/>
<id>urn:sha1:9ebc9ca070a21ba0aeb3f61202a8071bb250ccc8</id>
<content type='text'>
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 &lt;othacehe@gnu.org&gt;
</content>
</entry>
<entry>
<title>tests: Allow 'tests/git-authenticate.scm' to run when git/gpg is missing.</title>
<updated>2020-06-28T21:26:53Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-28T20:55:51Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=0a8dd8aae5fad365c2f429d48e4085a3b3388332'/>
<id>urn:sha1:0a8dd8aae5fad365c2f429d48e4085a3b3388332</id>
<content type='text'>
Fixes &lt;https://bugs.gnu.org/42077&gt;.
Reported by Jan Nieuwenhuizen &lt;janneke@gnu.org&gt;.

The typo was introduced in 7b06781a58326f251c4af6340379d68e3cb98adb.

* tests/git-authenticate.scm &lt;top level&gt;: Remove call to 'which'
around (gpg+git-available?).
</content>
</entry>
<entry>
<title>tests: Skip tests that requires gpg when gpg is unavailable.</title>
<updated>2020-06-20T11:18:11Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-20T10:55:59Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=7b06781a58326f251c4af6340379d68e3cb98adb'/>
<id>urn:sha1:7b06781a58326f251c4af6340379d68e3cb98adb</id>
<content type='text'>
Partly fixes &lt;https://bugs.gnu.org/41932&gt;.
Reported by Simen Endsjø &lt;simendsjo@gmail.com&gt;.

* tests/git-authenticate.scm ("signed commits, SHA1 signature"): Use
'gpg+git-available?' in skip guard.
</content>
</entry>
<entry>
<title>tests: Move OpenPGP helpers to (guix tests gnupg).</title>
<updated>2020-06-16T14:10:46Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-08T14:34:53Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=1e2b9bf2d4ed4edc9ed70c51f414bb2890074a21'/>
<id>urn:sha1:1e2b9bf2d4ed4edc9ed70c51f414bb2890074a21</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>git-authenticate: Disallow SHA1 (and MD5) signatures.</title>
<updated>2020-06-12T16:56:11Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-10T12:54:13Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=52c529ff20b389eb64ac033586e6b1a5c5d82cb5'/>
<id>urn:sha1:52c529ff20b389eb64ac033586e6b1a5c5d82cb5</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>git-authenticate: Prevent removal of '.guix-authorizations'.</title>
<updated>2020-06-07T21:10:46Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-07T21:06:41Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=e78275608065ef073775fabb9f1a757da65851f2'/>
<id>urn:sha1:e78275608065ef073775fabb9f1a757da65851f2</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>git-authenticate: Add tests.</title>
<updated>2020-06-05T20:54:06Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-06-01T21:20:06Z</published>
<link rel='alternate' type='text/html' href='http://git.rostovtsev.org/guix/commit/?id=c83eedba2361c3831d3efb5ad63d5077d636fb28'/>
<id>urn:sha1:c83eedba2361c3831d3efb5ad63d5077d636fb28</id>
<content type='text'>
* 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}.
</content>
</entry>
</feed>
