mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
g10: Properly ignore legacy keys in the keyring cache.
* g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys in the keyring cache. * tests/migrations/Makefile.am (TESTS): Add new test. * tests/migrations/common.scm (GPG-no-batch): New variable. (run-test): New function. * tests/migrations/issue2276.scm: New file. * tests/migrations/issue2276.tar.asc: Likewise. GnuPG-bug-id: 2276 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
45bb9a2a46
commit
d9839c9d30
5 changed files with 376 additions and 6 deletions
|
@ -30,6 +30,9 @@
|
|||
--no-secmem-warning --batch
|
||||
,(string-append "--agent-program=" GPG-AGENT
|
||||
"|--debug-quick-random")))
|
||||
(define GPG-no-batch
|
||||
(filter (lambda (arg) (not (equal? arg '--batch))) GPG))
|
||||
|
||||
(define GPGTAR (qualify (string-append (getcwd) "/../../tools/gpgtar")))
|
||||
|
||||
(define (untar-armored source-name)
|
||||
|
@ -37,3 +40,13 @@
|
|||
(pipe:open source-name (logior O_RDONLY O_BINARY))
|
||||
(pipe:spawn `(,@GPG --dearmor))
|
||||
(pipe:spawn `(,GPGTAR --extract --directory=. -))))
|
||||
|
||||
(define (run-test message src-tarball test)
|
||||
(catch (skip "gpgtar not built")
|
||||
(call-check `(,GPGTAR --help)))
|
||||
|
||||
(with-temporary-working-directory
|
||||
(info message)
|
||||
(untar-armored src-tarball)
|
||||
(setenv "GNUPGHOME" (getcwd) #t)
|
||||
(test (getcwd))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue