diff options
| -rw-r--r-- | Makefile.am | 22 | ||||
| -rw-r--r-- | build-aux/test-env.in | 4 | ||||
| -rw-r--r-- | guix/tests/gnupg.scm | 12 | ||||
| -rw-r--r-- | tests/guix-authenticate.sh | 4 | ||||
| -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.scm | 19 |
16 files changed, 32 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am index 1ef57af7a58..976c5cad742 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -802,17 +802,17 @@ EXTRA_DIST += \ | |||
| 802 | etc/manifests/upgrade.scm \ | 802 | etc/manifests/upgrade.scm \ |
| 803 | scripts/guix.in \ | 803 | scripts/guix.in \ |
| 804 | tests/cve-sample.json \ | 804 | tests/cve-sample.json \ |
| 805 | tests/keys/civodul.pub \ | 805 | tests/keys/openpgp/civodul.pub \ |
| 806 | tests/keys/dsa.pub \ | 806 | tests/keys/openpgp/dsa.pub \ |
| 807 | tests/keys/ed25519-2.pub \ | 807 | tests/keys/openpgp/ed25519-2.pub \ |
| 808 | tests/keys/ed25519-2.sec \ | 808 | tests/keys/openpgp/ed25519-2.sec \ |
| 809 | tests/keys/ed25519-3.pub \ | 809 | tests/keys/openpgp/ed25519-3.pub \ |
| 810 | tests/keys/ed25519-3.sec \ | 810 | tests/keys/openpgp/ed25519-3.sec \ |
| 811 | tests/keys/ed25519.pub \ | 811 | tests/keys/openpgp/ed25519.pub \ |
| 812 | tests/keys/ed25519.sec \ | 812 | tests/keys/openpgp/ed25519.sec \ |
| 813 | tests/keys/rsa.pub \ | 813 | tests/keys/openpgp/rsa.pub \ |
| 814 | tests/keys/signing-key.pub \ | 814 | tests/keys/openpgp/signing-key.pub \ |
| 815 | tests/keys/signing-key.sec \ | 815 | tests/keys/openpgp/signing-key.sec \ |
| 816 | tests/test.drv \ | 816 | tests/test.drv \ |
| 817 | $(TESTS) | 817 | $(TESTS) |
| 818 | 818 | ||
diff --git a/build-aux/test-env.in b/build-aux/test-env.in index 86c2e585d73..ade0190f08b 100644 --- a/build-aux/test-env.in +++ b/build-aux/test-env.in | |||
| @@ -73,8 +73,8 @@ then | |||
| 73 | # Copy the keys so that the secret key has the right permissions (the | 73 | # Copy the keys so that the secret key has the right permissions (the |
| 74 | # daemon errors out when this is not the case.) | 74 | # daemon errors out when this is not the case.) |
| 75 | mkdir -p "$GUIX_CONFIGURATION_DIRECTORY" | 75 | mkdir -p "$GUIX_CONFIGURATION_DIRECTORY" |
| 76 | cp "@abs_top_srcdir@/tests/keys/signing-key.sec" \ | 76 | cp "@abs_top_srcdir@/tests/keys/openpgp/signing-key.sec" \ |
| 77 | "@abs_top_srcdir@/tests/keys/signing-key.pub" \ | 77 | "@abs_top_srcdir@/tests/keys/openpgp/signing-key.pub" \ |
| 78 | "$GUIX_CONFIGURATION_DIRECTORY" | 78 | "$GUIX_CONFIGURATION_DIRECTORY" |
| 79 | chmod 400 "$GUIX_CONFIGURATION_DIRECTORY/signing-key.sec" | 79 | chmod 400 "$GUIX_CONFIGURATION_DIRECTORY/signing-key.sec" |
| 80 | fi | 80 | fi |
diff --git a/guix/tests/gnupg.scm b/guix/tests/gnupg.scm index 0e4573ae4da..104c621502c 100644 --- a/guix/tests/gnupg.scm +++ b/guix/tests/gnupg.scm | |||
| @@ -65,17 +65,17 @@ process is terminated afterwards." | |||
| 65 | (call-with-fresh-gnupg-setup imported (lambda () exp ...))) | 65 | (call-with-fresh-gnupg-setup imported (lambda () exp ...))) |
| 66 | 66 | ||
| 67 | (define %ed25519-public-key-file | 67 | (define %ed25519-public-key-file |
| 68 | (search-path %load-path "tests/keys/ed25519.pub")) | 68 | (search-path %load-path "tests/keys/openpgp/ed25519.pub")) |
| 69 | (define %ed25519-secret-key-file | 69 | (define %ed25519-secret-key-file |
| 70 | (search-path %load-path "tests/keys/ed25519.sec")) | 70 | (search-path %load-path "tests/keys/openpgp/ed25519.sec")) |
| 71 | (define %ed25519-2-public-key-file | 71 | (define %ed25519-2-public-key-file |
| 72 | (search-path %load-path "tests/keys/ed25519-2.pub")) | 72 | (search-path %load-path "tests/keys/openpgp/ed25519-2.pub")) |
| 73 | (define %ed25519-2-secret-key-file | 73 | (define %ed25519-2-secret-key-file |
| 74 | (search-path %load-path "tests/keys/ed25519-2.sec")) | 74 | (search-path %load-path "tests/keys/openpgp/ed25519-2.sec")) |
| 75 | (define %ed25519-3-public-key-file | 75 | (define %ed25519-3-public-key-file |
| 76 | (search-path %load-path "tests/keys/ed25519-3.pub")) | 76 | (search-path %load-path "tests/keys/openpgp/ed25519-3.pub")) |
| 77 | (define %ed25519-3-secret-key-file | 77 | (define %ed25519-3-secret-key-file |
| 78 | (search-path %load-path "tests/keys/ed25519-3.sec")) | 78 | (search-path %load-path "tests/keys/openpgp/ed25519-3.sec")) |
| 79 | 79 | ||
| 80 | (define (read-openpgp-packet file) | 80 | (define (read-openpgp-packet file) |
| 81 | (get-openpgp-packet | 81 | (get-openpgp-packet |
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 | ||
| 29 | trap 'rm -f "$sig" "$hash"' EXIT | 29 | trap 'rm -f "$sig" "$hash"' EXIT |
| 30 | 30 | ||
| 31 | key="$abs_top_srcdir/tests/keys/signing-key.sec" | 31 | key="$abs_top_srcdir/tests/keys/openpgp/signing-key.sec" |
| 32 | key_len="`echo -n $key | wc -c`" | 32 | key_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>. |
| 68 | hash="636166e9636166e9636166e9636166e9636166e9636166e9636166e9636166e9" | 68 | hash="636166e9636166e9636166e9636166e9636166e9636166e9636166e9636166e9" |
| 69 | latin1_cafe="caf$(printf '\351')" | 69 | latin1_cafe="caf$(printf '\351')" |
| 70 | echo "sign 26:tests/keys/signing-key.sec 64:$hash" | guix authenticate \ | 70 | echo "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) |
