{ return join("\n", map join(': ', @$_), @{(shift)->{trace}})."\n" }
}
+{
+ package Local::Exception::signature_from_future;
+ {our @ISA = qw(Local::Exception)}
+
+ sub summary { return 'directive signature timestamp from the future' }
+
+ sub message { my $M = <<'END'; return join(' ', split /\n/, $M); }
+GPG signed upload from the future - not allowed. Please make sure your
+clock is set correctly, resign the directive file, and upload again. You
+may have to wait 24 hours before re-uploading if you do not change the
+filename for your triplet.
+END
+}
+
{
package Local::Exception::signature_replay;
{our @ISA = qw(Local::Exception)}
# Verify that this timestamp is not too far in the future. We allow a
# discrepancy of 1 day so we don't have to worry about timezones
if ($timestamp > (time() + 24*3600)) {
- fatal("GPG signed upload from the future - not allowed. "
- ."Please make sure your clock is set correctly, "
- ."resign the directive file, and upload again. "
- ."You may have to wait 24 hours before re-uploading if you do not "
- ."change the filename for your triplet.",1);
+ throw signature_from_future => timestamp => $timestamp
}
exp_continue
}
-re {^gatekeeper\[[0-9]+\]: \(Test\) \[AA\]\
- GPG signed upload from the future - not allowed[^\r\n]+} {
+ directive signature timestamp from the future} {
# from read_directive_file, if signature timestamp bad
set A(validate,future-signature-timestamp) 1
exp_continue