diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-12-12 14:55:32 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-12-12 15:03:05 +0100 |
commit | 3677b97030e5954fa26bdb435e0d3379a1a4ec43 (patch) | |
tree | bb3d364684a72d6dd8461c3f2be543018a770848 /tests | |
parent | 94e9651241b3e827531779717952d386535801f3 (diff) | |
download | guix-patches-3677b97030e5954fa26bdb435e0d3379a1a4ec43.tar guix-patches-3677b97030e5954fa26bdb435e0d3379a1a4ec43.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pki.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/pki.scm b/tests/pki.scm index d6a6b476c7..86daff8ddf 100644 --- a/tests/pki.scm +++ b/tests/pki.scm @@ -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))) |