summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-03-01 17:38:09 +0100
committerNguyễn Gia Phong <cnx@loang.net>2026-04-10 14:55:04 +0900
commit4c7a7a1d498f4ca418a649a0b3e3a056569aec15 (patch)
treeae694f5f88917e752725a60a5526c4fbf6eb7688 /tests
parent4cbd5f883d1b05fd518f88e9256261b4229a6896 (diff)
tests: keys: Moving to openpgp subdirectory.
* tests/keys/*.(pub|sec): Move to tests/keys/openpgp/*.(pub|sec) * build-aux/test-env.in: Adapt accordingly. * Makefile.am: Likewise. * guix/tests/gnupg.scm: Likewise. * tests/guix-authenticate.sh: Likewise. * tests/openpgp.scm: Likewise. Change-Id: If8897cec9851cc51a4ebadcc5927dc0e0520b881 Reviewed-by: Danny Milosavljevic <dannym@friendly-machines.com> Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-authenticate.sh4
-rw-r--r--tests/keys/openpgp/civodul.pub (renamed from tests/keys/civodul.pub)0
-rw-r--r--tests/keys/openpgp/dsa.pub (renamed from tests/keys/dsa.pub)0
-rw-r--r--tests/keys/openpgp/ed25519-2.pub (renamed from tests/keys/ed25519-2.pub)0
-rw-r--r--tests/keys/openpgp/ed25519-2.sec (renamed from tests/keys/ed25519-2.sec)0
-rw-r--r--tests/keys/openpgp/ed25519-3.pub (renamed from tests/keys/ed25519-3.pub)0
-rw-r--r--tests/keys/openpgp/ed25519-3.sec (renamed from tests/keys/ed25519-3.sec)0
-rw-r--r--tests/keys/openpgp/ed25519.pub (renamed from tests/keys/ed25519.pub)0
-rw-r--r--tests/keys/openpgp/ed25519.sec (renamed from tests/keys/ed25519.sec)0
-rw-r--r--tests/keys/openpgp/rsa.pub (renamed from tests/keys/rsa.pub)0
-rw-r--r--tests/keys/openpgp/signing-key.pub (renamed from tests/keys/signing-key.pub)0
-rw-r--r--tests/keys/openpgp/signing-key.sec (renamed from tests/keys/signing-key.sec)0
-rw-r--r--tests/openpgp.scm19
13 files changed, 13 insertions, 10 deletions
diff --git a/tests/guix-authenticate.sh b/tests/guix-authenticate.sh
index ddd39d09c44..3fe974955c3 100644
--- a/tests/guix-authenticate.sh
+++ b/tests/guix-authenticate.sh
@@ -28,7 +28,7 @@ rm -f "$sig" "$hash"
28 28
29trap 'rm -f "$sig" "$hash"' EXIT 29trap 'rm -f "$sig" "$hash"' EXIT
30 30
31key="$abs_top_srcdir/tests/keys/signing-key.sec" 31key="$abs_top_srcdir/tests/keys/openpgp/signing-key.sec"
32key_len="`echo -n $key | wc -c`" 32key_len="`echo -n $key | wc -c`"
33 33
34# A hexadecimal string as long as a sha256 hash. 34# A hexadecimal string as long as a sha256 hash.
@@ -67,7 +67,7 @@ test "$code" -ne 0
67# encoded independently of the current locale: <https://bugs.gnu.org/43421>. 67# encoded independently of the current locale: <https://bugs.gnu.org/43421>.
68hash="636166e9636166e9636166e9636166e9636166e9636166e9636166e9636166e9" 68hash="636166e9636166e9636166e9636166e9636166e9636166e9636166e9636166e9"
69latin1_cafe="caf$(printf '\351')" 69latin1_cafe="caf$(printf '\351')"
70echo "sign 26:tests/keys/signing-key.sec 64:$hash" | guix authenticate \ 70echo "sign 34:tests/keys/openpgp/signing-key.sec 64:$hash" | guix authenticate \
71 | LC_ALL=C grep "hash sha256 \"$latin1_cafe" 71 | LC_ALL=C grep "hash sha256 \"$latin1_cafe"
72 72
73# Test for <http://bugs.gnu.org/17312>: make sure 'guix authenticate' produces 73# Test for <http://bugs.gnu.org/17312>: make sure 'guix authenticate' produces
diff --git a/tests/keys/civodul.pub b/tests/keys/openpgp/civodul.pub
index 272600ac937..272600ac937 100644
--- a/tests/keys/civodul.pub
+++ b/tests/keys/openpgp/civodul.pub
diff --git a/tests/keys/dsa.pub b/tests/keys/openpgp/dsa.pub
index 4727975c634..4727975c634 100644
--- a/tests/keys/dsa.pub
+++ b/tests/keys/openpgp/dsa.pub
diff --git a/tests/keys/ed25519-2.pub b/tests/keys/openpgp/ed25519-2.pub
index ef050e3845f..ef050e3845f 100644
--- a/tests/keys/ed25519-2.pub
+++ b/tests/keys/openpgp/ed25519-2.pub
diff --git a/tests/keys/ed25519-2.sec b/tests/keys/openpgp/ed25519-2.sec
index 059765f557e..059765f557e 100644
--- a/tests/keys/ed25519-2.sec
+++ b/tests/keys/openpgp/ed25519-2.sec
diff --git a/tests/keys/ed25519-3.pub b/tests/keys/openpgp/ed25519-3.pub
index 057f29577e8..057f29577e8 100644
--- a/tests/keys/ed25519-3.pub
+++ b/tests/keys/openpgp/ed25519-3.pub
diff --git a/tests/keys/ed25519-3.sec b/tests/keys/openpgp/ed25519-3.sec
index 04128a41318..04128a41318 100644
--- a/tests/keys/ed25519-3.sec
+++ b/tests/keys/openpgp/ed25519-3.sec
diff --git a/tests/keys/ed25519.pub b/tests/keys/openpgp/ed25519.pub
index 5a2fccc9f9a..5a2fccc9f9a 100644
--- a/tests/keys/ed25519.pub
+++ b/tests/keys/openpgp/ed25519.pub
diff --git a/tests/keys/ed25519.sec b/tests/keys/openpgp/ed25519.sec
index 068738dfabd..068738dfabd 100644
--- a/tests/keys/ed25519.sec
+++ b/tests/keys/openpgp/ed25519.sec
diff --git a/tests/keys/rsa.pub b/tests/keys/openpgp/rsa.pub
index 0ef9145ef0d..0ef9145ef0d 100644
--- a/tests/keys/rsa.pub
+++ b/tests/keys/openpgp/rsa.pub
diff --git a/tests/keys/signing-key.pub b/tests/keys/openpgp/signing-key.pub
index 092424a15d2..092424a15d2 100644
--- a/tests/keys/signing-key.pub
+++ b/tests/keys/openpgp/signing-key.pub
diff --git a/tests/keys/signing-key.sec b/tests/keys/openpgp/signing-key.sec
index 558e1891027..558e1891027 100644
--- a/tests/keys/signing-key.sec
+++ b/tests/keys/openpgp/signing-key.sec
diff --git a/tests/openpgp.scm b/tests/openpgp.scm
index 1f204667721..30be6644684 100644
--- a/tests/openpgp.scm
+++ b/tests/openpgp.scm
@@ -172,7 +172,7 @@ Pz7oopeN72xgggYUNT37ezqN3MeCqw0=
172 (not (port-ascii-armored? (open-bytevector-input-port %binary-sample)))) 172 (not (port-ascii-armored? (open-bytevector-input-port %binary-sample))))
173 173
174(test-assert "get-openpgp-keyring" 174(test-assert "get-openpgp-keyring"
175 (let* ((key (search-path %load-path "tests/keys/civodul.pub")) 175 (let* ((key (search-path %load-path "tests/keys/openpgp/civodul.pub"))
176 (keyring (get-openpgp-keyring 176 (keyring (get-openpgp-keyring
177 (open-bytevector-input-port 177 (open-bytevector-input-port
178 (call-with-input-file key read-radix-64))))) 178 (call-with-input-file key read-radix-64)))))
@@ -232,10 +232,11 @@ Pz7oopeN72xgggYUNT37ezqN3MeCqw0=
232 (verify-openpgp-signature signature keyring 232 (verify-openpgp-signature signature keyring
233 (open-input-string "Hello!\n")))) 233 (open-input-string "Hello!\n"))))
234 (list status (openpgp-public-key-id key))))) 234 (list status (openpgp-public-key-id key)))))
235 (list "tests/keys/rsa.pub" "tests/keys/dsa.pub" 235 (list "tests/keys/openpgp/rsa.pub"
236 "tests/keys/ed25519.pub" 236 "tests/keys/openpgp/dsa.pub"
237 "tests/keys/ed25519.pub" 237 "tests/keys/openpgp/ed25519.pub"
238 "tests/keys/ed25519.pub") 238 "tests/keys/openpgp/ed25519.pub"
239 "tests/keys/openpgp/ed25519.pub")
239 (list %hello-signature/rsa %hello-signature/dsa 240 (list %hello-signature/rsa %hello-signature/dsa
240 %hello-signature/ed25519/sha256 241 %hello-signature/ed25519/sha256
241 %hello-signature/ed25519/sha512 242 %hello-signature/ed25519/sha512
@@ -254,9 +255,11 @@ Pz7oopeN72xgggYUNT37ezqN3MeCqw0=
254 (call-with-input-file key read-radix-64)) 255 (call-with-input-file key read-radix-64))
255 keyring))) 256 keyring)))
256 %empty-keyring 257 %empty-keyring
257 '("tests/keys/rsa.pub" "tests/keys/dsa.pub" 258 '("tests/keys/openpgp/rsa.pub"
258 "tests/keys/ed25519.pub" "tests/keys/ed25519.pub" 259 "tests/keys/openpgp/dsa.pub"
259 "tests/keys/ed25519.pub")))) 260 "tests/keys/openpgp/ed25519.pub"
261 "tests/keys/openpgp/ed25519.pub"
262 "tests/keys/openpgp/ed25519.pub"))))
260 (map (lambda (signature) 263 (map (lambda (signature)
261 (let ((signature (string->openpgp-packet signature))) 264 (let ((signature (string->openpgp-packet signature)))
262 (let-values (((status key) 265 (let-values (((status key)