Gpgv2 and trustedkeys.gpg

From MyWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with 'Working on scripts to check PGP signatures of files and faced the problem with gpgv2 $ gpgv2 gpg_test.txt.asc gpg_test.txtgpgv: Signature made Mon 5 Oct 16:35:59 2009 IST usin...')
m (Protected "Gpgv2 and trustedkeys.gpg" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))

Revision as of 10:50, 11 October 2009

Working on scripts to check PGP signatures of files and faced the problem with gpgv2

$ gpgv2 gpg_test.txt.asc gpg_test.txtgpgv: Signature made Mon  5 Oct 16:35:59 2009 IST using DSA key ID C29DC8ABgpgv: [don't know]: invalid packet (ctb=2d)
gpgv: keydb_search failed: Invalid packet
gpgv: Can't check signature: No public key

So, it was evident that I'm missing a keyring. How to create one?

Thanks to the clue provided by http://ilostmynotes.blogspot.com/2008/05/debmirror-of-ubuntu-archive-validating.html

So, I listed my keys first:

$ gpg --list-keys Markelov

pub   1024D/C29DC8AB 2007-11-13 [expires: 2009-11-12]
uid                  Alex N Markelov (Primary key for emails.) <Alex.Markelov@gmail.com>
sub   2048g/E0E8C1F3 2007-11-13 [expires: 2009-11-12]
pub   1024D/55D857AA 2009-02-27 [expires: 2014-02-26]
uid                  Alex Markelov (makeITsimple PGP mail key) <alex@makeitsimple.ie>
sub   2048g/EE726DB4 2009-02-27 [expires: 2014-02-26]
pub   1024D/31262C86 2009-02-27 [expires: 2014-02-26]
uid                  Alex N Markelov (markelov.org mail PGP key) <alex@markelov.org>
sub   2048g/9C615D16 2009-02-27 [expires: 2014-02-26]

I want the one with ID 0xC29DC8AB:

$ gpg --export  0xC29DC8AB | gpg --no-default-keyring --keyring trustedkeys.gpg --import
gpg: keyring `/Users/amarkelo/.gnupg/trustedkeys.gpg' created
gpg: key C29DC8AB: public key "Alex N Markelov (Primary key for emails.) <Alex.Markelov@gmail.com>" imported 
gpg: Total number processed: 1
gpg:               imported: 1
gpg: public key of ultimately trusted key 31262C86 not found
gpg: public key of ultimately trusted key 55D857AA not found
gpg: public key of ultimately trusted key 052A8B73 not found
gpg: public key of ultimately trusted key B31ACAE9 not found
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   5  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 5u
gpg: next trustdb check due at 2009-11-12

Now gpgv2 is not complaining:

$ gpgv2 gpg_test.txt.asc gpg_test.txt
gpgv: Signature made Mon  5 Oct 16:35:59 2009 IST using DSA key ID C29DC8AB
gpgv: Good signature from "Alex N Markelov (Primary key for emails.) <Alex.Markelov@gmail.com>"
Personal tools