aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer/parted.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-09-17 13:53:32 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-09-17 14:10:43 +0200
commit88c71751619ae5f6ae13ad057d3862f29cb942a4 (patch)
tree397f423b34b0c63b733bebd6ea0db730a8d3156a /gnu/installer/parted.scm
parentcabac732deffafc796537658a6c33c6c4aec821e (diff)
downloadguix-88c71751619ae5f6ae13ad057d3862f29cb942a4.tar.gz
guix-88c71751619ae5f6ae13ad057d3862f29cb942a4.zip
gnu: grammalecte: Update to 1.12.2.
* gnu/packages/dictionaries.scm (grammalecte): Update to 1.12.2.
Diffstat (limited to 'gnu/installer/parted.scm')
0 files changed, 0 insertions, 0 deletions
-----") (define %hello-signature/ed25519/sha256 ;digest-algo: sha256 "\ -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRE0x4hr3E4+bYyKAp3H0nL+q4HLQUCXqRADAAKCRB3H0nL+q4H LUImAP9/foaSjPFC/MSr52LNV5ROSL9haea4jPpUP+N6ViFGowEA+AE/xpXPIqsz R6CdxMevURuqUpqQ7rHeiMmdUepeewU= =tLXy -----END PGP SIGNATURE-----") (define %hello-signature/ed25519/sha512 ;digest-algo: sha512 "\ -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRE0x4hr3E4+bYyKAp3H0nL+q4HLQUCXqRAGgAKCRB3H0nL+q4H LTeKAP0S8LiiosJXOARlYNdhfGw9j26lHrbwJh5CORGlaqqIJAEAoMYcmtNa2b6O inlEwB/KQM88O9RwA8xH7X5a0rodOw4= =68r/ -----END PGP SIGNATURE-----") (define %hello-signature/ed25519/sha1 ;digest-algo: sha1 "\ -----BEGIN PGP SIGNATURE----- iHUEABYCAB0WIQRE0x4hr3E4+bYyKAp3H0nL+q4HLQUCXqRALQAKCRB3H0nL+q4H LdhEAQCfkdYhIVRa43oTNw9EL/TDFGQjXSHNRFVU0ktjkWbkQwEAjIXhvj2sqy79 Pz7oopeN72xgggYUNT37ezqN3MeCqw0= =AE4G -----END PGP SIGNATURE-----") (test-begin "openpgp") (test-equal "read-radix-64" '(#t "PGP MESSAGE") (let-values (((data type) (call-with-input-string %radix-64-sample read-radix-64))) (list (bytevector? data) type))) (test-equal "read-radix-64, CRC mismatch" '(#f "PGP MESSAGE") (call-with-values (lambda () (call-with-input-string %radix-64-sample/crc-mismatch read-radix-64)) list)) (test-assert "port-ascii-armored?, #t" (call-with-input-string %radix-64-sample port-ascii-armored?)) (test-assert "port-ascii-armored?, #f" (not (port-ascii-armored? (open-bytevector-input-port %binary-sample)))) (test-assert "get-openpgp-keyring" (let* ((key (search-path %load-path "tests/keys/civodul.pub")) (keyring (get-openpgp-keyring (open-bytevector-input-port (call-with-input-file key read-radix-64))))) (let-values (((primary packets) (lookup-key-by-id keyring %civodul-key-id))) (let ((fingerprint (openpgp-public-key-fingerprint primary))) (and (= (openpgp-public-key-id primary) %civodul-key-id) (not (openpgp-public-key-subkey? primary)) (string=? (openpgp-format-fingerprint fingerprint) %civodul-fingerprint) (string=? (openpgp-user-id-value (find openpgp-user-id? packets)) "Ludovic Courtès <ludo@gnu.org>") (eq? (lookup-key-by-fingerprint keyring fingerprint) primary)))))) (test-equal "get-openpgp-detached-signature/ascii" (list `(,%dsa-key-id ,%dsa-key-fingerprint dsa sha256) `(,%rsa-key-id ,%rsa-key-fingerprint rsa sha256) `(,%ed25519-key-id ,%ed25519-key-fingerprint eddsa sha256) `(,%ed25519-key-id ,%ed25519-key-fingerprint eddsa sha512) `(,%ed25519-key-id ,%ed25519-key-fingerprint eddsa sha1)) (map (lambda (str) (let ((signature (get-openpgp-detached-signature/ascii (open-input-string str)))) (list (openpgp-signature-issuer-key-id signature) (openpgp-signature-issuer-fingerprint signature) (openpgp-signature-public-key-algorithm signature) (openpgp-signature-hash-algorithm signature)))) (list %hello-signature/dsa %hello-signature/rsa %hello-signature/ed25519/sha256 %hello-signature/ed25519/sha512 %hello-signature/ed25519/sha1))) (test-equal "verify-openpgp-signature, missing key" `(missing-key ,%rsa-key-fingerprint) (let* ((keyring (get-openpgp-keyring (%make-void-port "r"))) (signature (string->openpgp-packet %hello-signature/rsa))) (let-values (((status key) (verify-openpgp-signature signature keyring (open-input-string "Hello!\n")))) (list status key)))) (test-equal "verify-openpgp-signature, good signatures" `((good-signature ,%rsa-key-id) (good-signature ,%dsa-key-id) (good-signature ,%ed25519-key-id) (good-signature ,%ed25519-key-id) (good-signature ,%ed25519-key-id)) (map (lambda (key signature) (let* ((key (search-path %load-path key)) (keyring (get-openpgp-keyring (open-bytevector-input-port (call-with-input-file key read-radix-64)))) (signature (string->openpgp-packet signature))) (let-values (((status key) (verify-openpgp-signature signature keyring (open-input-string "Hello!\n")))) (list status (openpgp-public-key-id key))))) (list "tests/keys/rsa.pub" "tests/keys/dsa.pub" "tests/keys/ed25519.pub" "tests/keys/ed25519.pub" "tests/keys/ed25519.pub") (list %hello-signature/rsa %hello-signature/dsa %hello-signature/ed25519/sha256 %hello-signature/ed25519/sha512 %hello-signature/ed25519/sha1))) (test-equal "verify-openpgp-signature, bad signature" `((bad-signature ,%rsa-key-id) (bad-signature ,%dsa-key-id) (bad-signature ,%ed25519-key-id) (bad-signature ,%ed25519-key-id) (bad-signature ,%ed25519-key-id)) (let ((keyring (fold (lambda (key keyring) (let ((key (search-path %load-path key))) (get-openpgp-keyring (open-bytevector-input-port (call-with-input-file key read-radix-64)) keyring))) %empty-keyring '("tests/keys/rsa.pub" "tests/keys/dsa.pub" "tests/keys/ed25519.pub" "tests/keys/ed25519.pub" "tests/keys/ed25519.pub")))) (map (lambda (signature) (let ((signature (string->openpgp-packet signature))) (let-values (((status key) (verify-openpgp-signature signature keyring (open-input-string "What?!")))) (list status (openpgp-public-key-id key))))) (list %hello-signature/rsa %hello-signature/dsa %hello-signature/ed25519/sha256 %hello-signature/ed25519/sha512 %hello-signature/ed25519/sha1)))) (test-end "openpgp")