Opened 6 years ago

Closed 6 years ago

#11452 closed defect (fixed)

undef DEAD_CERT_LIFETIME too in trusted_dirs_remove_old_certs()

Reported by: arma Owned by:
Priority: Very Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Keywords: easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In trusted_dirs_remove_old_certs() we have

#define DEAD_CERT_LIFETIME (2*24*60*60)
#define OLD_CERT_LIFETIME (7*24*60*60)
[...use them...]

Shouldn't we undef both (or neither)?

Introduced in git commit 8157b8b7.

Child Tickets

Attachments (1)

0001-Update-a-comment-and-undef-an-identifier.patch (1.4 KB) - added by arlolra 6 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by arma

The code comment says

/** Remove all v3 authority certificates that have been superseded for more
 * than 48 hours.  (If the most recent cert was published more than 48 hours
 * ago, then we aren't going to get any consensuses signed with older
 * keys.) */

But I think in many cases this function considers 7 days, not 2 days? We should fix the comment.

comment:2 Changed 6 years ago by nickm

Right on both counts; feel free to patch or to write a patch.

comment:3 Changed 6 years ago by arlolra

Status: newneeds_review

Added a patch.

comment:4 Changed 6 years ago by arma

Looks good to me!

comment:5 Changed 6 years ago by nickm

Looks okay; applied

comment:6 Changed 6 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.