mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-28 15:57:03 +01:00
* gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs. Fail more
elegantly if there is no email address to send to. Show the GnuPG version in the message body. ---------------------------------------------------------------------- gpgkeys_mailto.in CVS: ----------------------------------------------------------------------
This commit is contained in:
parent
b67d342b9d
commit
fd415ba29f
@ -1,3 +1,9 @@
|
|||||||
|
2002-07-09 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs.
|
||||||
|
Fail more elegantly if there is no email address to send to. Show
|
||||||
|
the GnuPG version in the message body.
|
||||||
|
|
||||||
2002-07-04 David Shaw <dshaw@jabberwocky.com>
|
2002-07-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display
|
* gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display
|
||||||
|
@ -47,9 +47,14 @@ while(<STDIN>)
|
|||||||
$command=$1;
|
$command=$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(/^HOST (\S+)/)
|
if(/^OPAQUE (\S+)/)
|
||||||
{
|
{
|
||||||
$host=$1;
|
$address=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(/^PROGRAM (\S+)/)
|
||||||
|
{
|
||||||
|
$program=$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(/^OPTION (\w+)/)
|
if(/^OPTION (\w+)/)
|
||||||
@ -65,6 +70,14 @@ while(<STDIN>)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$program="(unknown)" if(!defined($program));
|
||||||
|
|
||||||
|
if(!defined($address))
|
||||||
|
{
|
||||||
|
print STDERR "gpgkeys: no address provided\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
while(<STDIN>)
|
while(<STDIN>)
|
||||||
{
|
{
|
||||||
last if($_ eq "\n");
|
last if($_ eq "\n");
|
||||||
@ -92,7 +105,7 @@ if($command=~/get/i || $command=~/search/i)
|
|||||||
{
|
{
|
||||||
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
||||||
print MAIL "From: $name <$login>\n";
|
print MAIL "From: $name <$login>\n";
|
||||||
print MAIL "To: $host\n";
|
print MAIL "To: $address\n";
|
||||||
if($command=~/get/i)
|
if($command=~/get/i)
|
||||||
{
|
{
|
||||||
# mail keyservers don't like long-form keyids
|
# mail keyservers don't like long-form keyids
|
||||||
@ -113,7 +126,7 @@ if($command=~/get/i || $command=~/search/i)
|
|||||||
{
|
{
|
||||||
print MAIL "Subject: GET $key\n\n";
|
print MAIL "Subject: GET $key\n\n";
|
||||||
}
|
}
|
||||||
print MAIL "GnuPG keyserver request\n";
|
print MAIL "GnuPG $program email keyserver request\n";
|
||||||
close(MAIL);
|
close(MAIL);
|
||||||
|
|
||||||
# Tell GnuPG not to expect a key
|
# Tell GnuPG not to expect a key
|
||||||
@ -121,7 +134,7 @@ if($command=~/get/i || $command=~/search/i)
|
|||||||
|
|
||||||
if($verbose)
|
if($verbose)
|
||||||
{
|
{
|
||||||
print STDERR "gpgkeys: key $key requested from $host\n";
|
print STDERR "gpgkeys: key $key requested from $address\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,7 +145,7 @@ if($command=~/send/i)
|
|||||||
{
|
{
|
||||||
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
||||||
print MAIL "From: $name <$login>\n";
|
print MAIL "From: $name <$login>\n";
|
||||||
print MAIL "To: $host\n";
|
print MAIL "To: $address\n";
|
||||||
print MAIL "Subject: ADD\n\n";
|
print MAIL "Subject: ADD\n\n";
|
||||||
|
|
||||||
while(<STDIN>)
|
while(<STDIN>)
|
||||||
@ -158,7 +171,7 @@ if($command=~/send/i)
|
|||||||
|
|
||||||
if($verbose)
|
if($verbose)
|
||||||
{
|
{
|
||||||
print STDERR "gpgkeys: key $key sent to $host\n";
|
print STDERR "gpgkeys: key $key sent to $address\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user