Make gpg-pubkey headers properly verifiable
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 24 Nov 2011 09:39:36 +0000 (11:39 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 24 Nov 2011 09:58:44 +0000 (11:58 +0200)
commit3a75a9f6c4fea02cc067a0d4836dd196d819d5b1
treecf6fbae4257694b86a37401c1eeb37146aa976d1
parent66d6987120105f77cd8b41999ec5d38220a41b27
Make gpg-pubkey headers properly verifiable

- The pubkey headers have been rpm v3 all the way until now, whoops :)
  Pull the actual key part of the header into immutable region and
  stomp a sha1 digest on the result, allowing a (much) better
  verification on loading. This part inspired by stumbling on a
  related discussion on rpm5.org mailing list so credits where...
- Since we only insert either literally constant data or data retrieved
  from the actual key into the immutable part of the header, the
  calculated digest is constant for a given key regardless of where
  and when it was imported. This gives some added verification and/or
  cross-checking possibilities (eg was the imported key exactly the
  same as what shipped etc)
lib/rpmts.c