summaryrefslogtreecommitdiff
path: root/Echolot/Pinger.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-02 18:03:55 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-02 18:03:55 +0000
commitbcb4b53f7c2aec7062fac9f468496381a257ad82 (patch)
tree0cb2a6507df952e4788c78d35a726f8d6c20d660 /Echolot/Pinger.pm
parent6319ed28454066f9530ab9c758ce85faedb6d6f9 (diff)
ping cpunk without pgponly in clear too
Diffstat (limited to 'Echolot/Pinger.pm')
-rw-r--r--Echolot/Pinger.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/Echolot/Pinger.pm b/Echolot/Pinger.pm
index 6ffe729..86ba068 100644
--- a/Echolot/Pinger.pm
+++ b/Echolot/Pinger.pm
@@ -1,7 +1,7 @@
package Echolot::Pinger;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Pinger.pm,v 1.9 2002/07/02 17:04:51 weasel Exp $
+# $Id: Pinger.pm,v 1.10 2002/07/02 18:03:55 weasel Exp $
#
=pod
@@ -50,13 +50,18 @@ sub do_mix_ping($$$$$) {
sub do_cpunk_ping($$$$$$) {
my ($address, $type, $keyid, $time, $to, $body) = @_;
- my %key = Echolot::Globals::get()->{'storage'}->get_key($address, $type, $keyid);
+ my $keyhash;
+ if ($type ne 'cpunk-clear') {
+ my %key = Echolot::Globals::get()->{'storage'}->get_key($address, $type, $keyid);
+ $keyhash = { $keyid => \%key };
+ };
Echolot::Pinger::CPunk::ping(
$body,
$to,
[ { address => $address,
- keyid => $keyid } ],
- { $keyid => \%key },
+ keyid => $keyid,
+ encrypt => ($type ne 'cpunk-clear') } ],
+ $keyhash,
$type eq 'cpunk-rsa' ) or
return 0;
@@ -78,7 +83,7 @@ sub do_ping($$$) {
my $to = Echolot::Tools::make_address('ping');
if ($type eq 'mix') {
do_mix_ping($address, $key, $now, $to, $body);
- } elsif ($type eq 'cpunk-rsa' || $type eq 'cpunk-dsa') {
+ } elsif ($type eq 'cpunk-rsa' || $type eq 'cpunk-dsa' || $type eq 'cpunk-clear') {
do_cpunk_ping($address, $type, $key, $now, $to, $body);
} else {
cluck ("Don't know how to handle ping type $type");