Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

updating gpg keys



At one point, quite possibly at the BLU keysigning, someone mentioned
that it would be useful to have a script that would automatically
update the keys on your keyring.  The purpose of doing so is to obtain
the latest signatures on keys that you have, and widen your ring of
trust.  I just hacked up a little perl script to do this.  You could
add it to your crontab to make sure it's done automatically for you,
every so often...

I provide it here in the hope that it will be useful to someone.  =8^)
You could also do the same thing with --send-key, if your keys are
changing often enough through means other than downloading them via
keyservers...  Not sure how useful that would be though, so I didn't
bother to include it in the script.


-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D

-------------- next part --------------
#!/usr/bin/perl

my $key_id;
my $gpg = "/usr/bin/gpg";
my $keysv = "--keyserver pgp.mit.edu";

open(GETGPGKEYS, "$gpg --list-keys|");

while (<GETGPGKEYS>){

	if (/^pub/){
		s!^.*[0-9]{3,4}[dDgGR]/([0-9A-F]*) .*!0x$1!;
		system("$gpg $keysv --recv-key $_");
	}
}




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org