Import only packets which are allowed in a keyblock.
authorWerner Koch <wk@gnupg.org>
Thu, 20 Dec 2012 08:43:41 +0000 (09:43 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 20 Dec 2012 08:43:41 +0000 (09:43 +0100)
commitf795a0d59e197455f8723c300eebf59e09853efa
treea60c4ac164113e8a83f72795b61d1bc76cd05dc6
parent5c557a51cdf37d9f50b3d5d7e11d17e6ea6bb2b8
Import only packets which are allowed in a keyblock.

* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--

A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring.  This change skips all
packets which are not allowed in a keyblock.

GnuPG-bug-id: 1455
g10/import.c