X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=keylookup%2Fkeylookup;h=44fae86d1999b5a60f1f71e47e336975d2bf062e;hb=636ca24d1db03a701c646b9a70e664af93560a7e;hp=3f2de1487394d68f2b6e9a6c56abca8795ee33f6;hpb=e0a862a5d077f8d925cc2380f6dc4355ff42c17c;p=pgp-tools.git diff --git a/keylookup/keylookup b/keylookup/keylookup index 3f2de14..44fae86 100755 --- a/keylookup/keylookup +++ b/keylookup/keylookup @@ -19,8 +19,10 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# Keylookup homepage: http://www.palfrader.org/keylookup/ -# CVS, BTS: http://savannah.gnu.org/projects/keylookup/ +# Keylookup is part of pgp-tools: +# http://pgp-tools.alioth.debian.org/ +# svn://svn.debian.org/pgp-tools/trunk/ +# http://svn.debian.org/wsvn/pgp-tools/trunk/ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'}; $|=1; # Always flush buffers @@ -93,7 +95,7 @@ sub getHits($) { push @ops, '--with-colons'; push @ops, '--fixed-list-mode'; push @ops, '--search'; - push @ops, $options->{'search'}; + push @ops, @{$options->{'search'}}; exec(@ops); die ("Cannot exec GnuPG: $!\n"); }; @@ -343,13 +345,14 @@ sub version { ## Take all additional arguments to the program as a search target, ## escape the string for use in URLs. - $options{'search'} = join ' ', @ARGV; - $options{'search'} =~ s/ ( [^A-Za-z0-9] ) - / '%' . unpack("H2", $1) - /xeg; + $options{'search'} = \@ARGV; my $keys = getHits( \%options ); my $keyids; + if (scalar keys %$keys == 0) { + print "GnuPG did not find any keys matching your search string.\n"; + exit 0; + }; if ($options{'importall'}) { my @allkeys = keys %$keys; $keyids = \@allkeys;