mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
6577682a6c
commit
8b7d982e6a
3 changed files with 125 additions and 11 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue