mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
pki: 'public-keys->acl' deduplicates entries.
Reported by Tobias Geerinckx-Rice <me@tobias.gr> in <https://issues.guix.gnu.org/50892>. * guix/pki.scm (public-keys->acl): Add call to 'delete-duplicates'. * tests/pki.scm ("public-keys->acl deduplication"): New test.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -66,6 +66,10 @@
|
||||
(test-assert "authorized-key? public-key singleton"
|
||||
(authorized-key? %public-key (public-keys->acl (list %public-key))))
|
||||
|
||||
(test-equal "public-keys->acl deduplication"
|
||||
(public-keys->acl (list %public-key))
|
||||
(public-keys->acl (make-list 10 %public-key)))
|
||||
|
||||
(test-assert "signature-case valid-signature"
|
||||
(let* ((hash (sha256 #vu8(1 2 3)))
|
||||
(data (bytevector->hash-data hash #:key-type (key-type %public-key)))
|
||||
|
||||
Reference in New Issue
Block a user