gpg: Correctly handle keyblocks followed by legacy keys.
authorNeal H. Walfield <neal@g10code.com>
Tue, 17 Nov 2015 11:55:42 +0000 (12:55 +0100)
committerNeal H. Walfield <neal@g10code.com>
Tue, 17 Nov 2015 13:53:03 +0000 (14:53 +0100)
commitad9befab12376b3a49cde410996ac9f0013d0871
treeca660fec2392b97f6b1055eade50957f2d189d89
parent8f6099ac510526d89be50309dbeb52f62bbaa7d1
gpg: Correctly handle keyblocks followed by legacy keys.

* g10/keyring.c (keyring_get_keyblock): If we encounter a legacy
packet after already having some non-legacy packets, then treat the
legacy packet as a keyblock boundary, not as part of the keyblock.
* g10/t-keydb-get-keyblock.c: New file.
* g10/t-keydb-get-keyblock.gpg: New file.
* g10/Makefile.am (EXTRA_DIST): Add t-keydb-get-keyblock.gpg.
(module_tests): Add t-keydb-get-keyblock.
(t_keydb_get_keyblock_SOURCES): New variable.
(t_keydb_get_keyblock_LDADD): Likewise.

--
Signed-off-by: Neal H. Walfield
GnuPG-bug-id: 2151
g10/Makefile.am
g10/keyring.c
g10/t-keydb-get-keyblock.c [new file with mode: 0644]
g10/t-keydb-get-keyblock.gpg [new file with mode: 0644]