mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* gpgkeys_mailto.in: Set 'mail-from' as a keyserver-option, rather
than the ugly ?from= syntax.
This commit is contained in:
parent
ee9edfe19f
commit
7c57091f10
@ -1,3 +1,8 @@
|
|||||||
|
2009-05-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_mailto.in: Set 'mail-from' as a keyserver-option, rather
|
||||||
|
than the ugly ?from= syntax.
|
||||||
|
|
||||||
2009-04-20 David Shaw <dshaw@jabberwocky.com>
|
2009-04-20 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gpgkeys_hkp.c (srv_replace): New function to transform a SRV
|
* gpgkeys_hkp.c (srv_replace): New function to transform a SRV
|
||||||
|
@ -52,10 +52,6 @@ if(@ARGV)
|
|||||||
open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
|
open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
($login,$name)=(getpwuid($<))[0,6];
|
|
||||||
|
|
||||||
$from="$name <$login>";
|
|
||||||
|
|
||||||
while(<STDIN>)
|
while(<STDIN>)
|
||||||
{
|
{
|
||||||
last if($_ eq "\n");
|
last if($_ eq "\n");
|
||||||
@ -85,7 +81,22 @@ while(<STDIN>)
|
|||||||
{
|
{
|
||||||
$verbose--;
|
$verbose--;
|
||||||
}
|
}
|
||||||
|
elsif($1=~/^mail-from=(.+)$/i)
|
||||||
|
{
|
||||||
|
$from=$1;
|
||||||
}
|
}
|
||||||
|
elsif($1=~/^no-mail-from$/i)
|
||||||
|
{
|
||||||
|
undef $from;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!defined($from))
|
||||||
|
{
|
||||||
|
($login,$name)=(getpwuid($<))[0,6];
|
||||||
|
$from="$name <$login>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$program="(unknown)" if(!defined($program));
|
$program="(unknown)" if(!defined($program));
|
||||||
@ -96,29 +107,6 @@ if(!defined($address))
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
# decode $address
|
|
||||||
|
|
||||||
($address,$args)=split(/\?/,$address);
|
|
||||||
|
|
||||||
if(defined($args))
|
|
||||||
{
|
|
||||||
@pairs = split(/&/, $args);
|
|
||||||
foreach $pair (@pairs)
|
|
||||||
{
|
|
||||||
($hdr, $val) = split(/=/, $pair);
|
|
||||||
$hdr =~ tr/+/ /;
|
|
||||||
$hdr =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
|
||||||
$val =~ tr/+/ /;
|
|
||||||
$val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
|
||||||
# we only handle "from" right now
|
|
||||||
if($hdr=~/^from$/i)
|
|
||||||
{
|
|
||||||
$from=$val;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while(<STDIN>)
|
while(<STDIN>)
|
||||||
{
|
{
|
||||||
last if($_ eq "\n");
|
last if($_ eq "\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user