diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-25 00:08:05 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-07-01 23:34:51 +0200 |
commit | 8b7d982e6ae090eb5b3938db14a8eb2e2c3a1419 (patch) | |
tree | 63cf99e39646f07d849c46a656e233e164e88f11 /guix | |
parent | 6577682a6c4885020949e014a536f96e8ae315d0 (diff) | |
download | guix-patches-8b7d982e6ae090eb5b3938db14a8eb2e2c3a1419.tar guix-patches-8b7d982e6ae090eb5b3938db14a8eb2e2c3a1419.tar.gz |
channels: Make channel introductions public.
* guix/channels.scm (<channel-introduction>): Rename constructor to
'%make-channel-introduction'.
(make-channel-introduction): New procedure.
* tests/channels.scm ("authenticate-channel, wrong first commit signer")
("authenticate-channel, .guix-authorizations"): Use
'make-channel-introduction' without '@@' and without third argument.
* doc/guix.texi (Channels)[Channel Authentication, Specifying Channel
Authorizations]: New subsections.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/channels.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/guix/channels.scm b/guix/channels.scm index 02619c253f..5f48e6f04f 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -69,7 +69,9 @@ channel-location channel-introduction? - ;; <channel-introduction> accessors purposefully omitted for now. + make-channel-introduction + channel-introduction-first-signed-commit + channel-introduction-first-commit-signer openpgp-fingerprint->bytevector openpgp-fingerprint @@ -130,13 +132,19 @@ ;; commit so that only them may emit this introduction. Introductions are ;; used to bootstrap trust in a channel. (define-record-type <channel-introduction> - (make-channel-introduction first-signed-commit first-commit-signer - signature) + (%make-channel-introduction first-signed-commit first-commit-signer + signature) channel-introduction? (first-signed-commit channel-introduction-first-signed-commit) ;hex string (first-commit-signer channel-introduction-first-commit-signer) ;bytevector (signature channel-introduction-signature)) ;string +(define (make-channel-introduction commit signer) + "Return a new channel introduction: COMMIT is the introductory where +authentication starts, and SIGNER is the OpenPGP fingerprint (a bytevector) of +the signer of that commit." + (%make-channel-introduction commit signer #f)) + (define (openpgp-fingerprint->bytevector str) "Convert STR, an OpenPGP fingerprint (hexadecimal string with whitespace), to the corresponding bytevector." |