--- sig2dot.pl.old 2003-07-11 15:46:14.000000000 -0400 +++ sig2dot.pl 2003-07-11 16:17:01.000000000 -0400 @@ -8,7 +8,7 @@ # suitable for use by dot or neato (package name graphviz, # http://www.research.att.com/sw/tools/graphviz/) like so: # -# gpg --list-sigs --keyring /usr/share/keyrings/debian-keyring.gpg | ./sig2dot.pl > debian-keyring.dot +# gpg --with-colons --check-sigs --keyring /usr/share/keyrings/debian-keyring.gpg | ./sig2dot.pl > debian-keyring.dot # neato -Tps debian-keyring.dot > debian-keyring.neato.dot.ps # dot -Tps debian-keyring.dot > debian-keyring.dot.dot.ps # @@ -21,23 +21,29 @@ # v0.15 Jun 20 17:16 fixed blue, green is proportional to ratio # v0.16 Jun 20 18:55 uniqed %signedby # v0.17 Jan 10 19:10 Use overlap=scale instead of fixed edge lengths. Requires graphviz v1.7.8. +# v0.18? 2003-07-11 Jeremy Portzer patch to use --with-colons input while ($line = ) { chomp $line; - if ($line =~ m#([^ ]+) +([^ ]+) +[^ ]+ +([^<]+)#) + if ($line =~ /^(pub|sig)/ ) #types we can process { - $type = $1; - $id = $2; - $name = $3; + @fields = split(/:/,$line); + $type = $fields[0]; + $id = $fields[4]; + $name = $fields[9]; + + #strip off leading 8 bytes of key ID that we don't need + $id = substr($id,8); + # strip trailing whitespace more cleanly: $name =~ s/\s+$//g; if ($type eq "pub") { - $id = (split('/',$id))[1]; $owner = $id; } + print STDERR "Processing owner,type,id,name : $owner,$type,$id,$name\n"; $name{$id} = $name;