| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes more sense because:
* `start_bound` and `end_bound` return `Bound::Included`
* It doesn't make sense to say that a document isn't valid at
the very start of its validity period. (And we don't want a half-open range.)
* NotYetValid(0ns) and Expired(0ns) are rather nonsensical errors.
In real timeliness tests it will make no difference since the current
time is only equal to the bound for a nanosecond. But tests that like
to test corner cases might be affected, and possibly some synthetic
situations (where the document's own validity time start is used
somehow) might change.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
Fixes: #1691
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Make sure that arithmetic with SystemTime and Duration fits into
SystemTime. If the result does not fit, set the affected boundary to
None. After all it implies that this point in time is not reachable
on the system.
Avoids integer overflow or panic, depending on debug or release build.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We can now get rid of the standalone `intersect_bounds` function.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
| |
By implementing `RangeBounds` for `TimerangeBound`, we get
`RangeBoundsExt` for free. This will enable `parse_decrypt_validate` to
easily compute the intersection of the `TimerangeBound`s its layers.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
| |
This will be used for computing the final `TimerangeBound` of a `HsDesc`
from the `TimerangeBound`s of its inner and outer layers.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
| |
This makes `descriptor_ensure` refetch the descriptor if it has been
cached for longer than `descriptor-lifetime` minutes.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The four values of times taken in a particular test were changed to both
be human readable and have comments explaining their significance (they
are all important moments after the Unix Epoch for freedom)
|
| |
|
|
|
|
|
|
|
|
|
| |
These functions consume a checkable wrapper, and return a new
checkable wrapper with mapped contents but the same not-yet-checked
constraints.
As documented, They are "dangerous" because the provided function
gets access to the contents before they are checked; the caller has
to make sure that the provided function doesn't expose their
contents inappropriately.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |\
| |
| |
| |
| | |
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
|
| | |
| |
| |
| |
| | |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |/ |
|
| |
|
|
|
| |
I want one of these for the bridge descriptor downloader, and they
seem reasonable to me.
|
| | |
|
| | |
|
| | |
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|