summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-04-24 10:50:02 +0000
committerPeter Palfrader <peter@palfrader.org>2004-04-24 10:50:02 +0000
commit76e2deb98e31184511fd0c6cdc7d9b079a433da3 (patch)
treedf05b3c8dbb8f9127f496dc0e9e2034dc0481004
parent54452b9931d8bc255b5706dbeade6432dd28e317 (diff)
Do not accept expired or future mixmaster keys
-rw-r--r--Echolot/Conf.pm10
-rw-r--r--NEWS1
-rw-r--r--TODO1
3 files changed, 11 insertions, 1 deletions
diff --git a/Echolot/Conf.pm b/Echolot/Conf.pm
index 0c3eb50..83f53cc 100644
--- a/Echolot/Conf.pm
+++ b/Echolot/Conf.pm
@@ -289,6 +289,8 @@ sub parse_mix_key($$$) {
address => $address,
version => $version,
caps => $caps,
+ created => $created,
+ expires => $expires,
summary => $_
};
};
@@ -312,6 +314,14 @@ sub parse_mix_key($$$) {
(! defined $mixmasters{$keyid}->{'nick'} && defined $mixmasters{$keyid}->{'key'}) and
Echolot::Log::info("Mixmaster key without key header in reply from $remailer_address."),
next;
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime();
+ my $today = sprintf("%04d-%02d-%02d", $year+1900, $mon+1, $mday);
+ (defined $mixmasters{$keyid}->{'created'} && ($today lt $mixmasters{$keyid}->{'created'})) and
+ Echolot::Log::info("Mixmaster key for $remailer_address created in the future ($today < $created)."),
+ next;
+ (defined $mixmasters{$keyid}->{'expires'} && ($mixmasters{$keyid}->{'expires'} lt $today)) and
+ Echolot::Log::info("Mixmaster key for $remailer_address expired ($expires < $today)."),
+ next;
if ($remailer->{'address'} ne $remailer_address) {
# Address mismatch -> Ignore reply and add $remailer_address to prospective addresses
diff --git a/NEWS b/NEWS
index e5b584a..d11f4bd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Changes in version - 2004
for set pingit=off showit=off fetch=off and =on respectively.
* Accept show=, ping=, and fetchit= in addition to their real
names in set.
+ * Do not accept expired or future mixmaster keys.
Changes in version 2.1.3 - 2004-04-20
* Improvements to pingd.conf(5) by Colin.
diff --git a/TODO b/TODO
index 8496663..e7ac934 100644
--- a/TODO
+++ b/TODO
@@ -18,7 +18,6 @@ Legend:
- close and open files instead of keeping all the files open
- make 'not a remailer' check not that strict
-
can be done later:
- allow capsstring overrides/additions
- check gnupg version number on startup