| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This may be temporary if we wind up converting to CtByteArray,
but for now it's good to be terse.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
These are deliberately unsophisticated accessors, in that they return Option<>
rather than filling in missing values with the documented
fallbacks. It seems better to leave a way to distinguish the absent
case in the API.
|
| |
|
|
|
| |
This breaks some experimental APIs, but since they are experimental
no semver note is needed.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
| |
For now, this will be useful in a test.
|
| |
|
|
|
|
|
|
| |
SharedRandVal now holds only the 32-byte random value itself; the
"number of commits" field is in SharedRandStatus.
This commit also makes the SharedRandVal be exactly 32 bytes, since
we've set it to that value in the spec.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
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.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
| |
These required hex-editing identity certificates :P
|
| | |
|
| |
|
|
| |
This is from Akka, which ahf runs.
|
| |
|
|
| |
This issue is now torspec!94.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Small misc yaks for bridge descriptor persistence
See merge request tpo/core/arti!828
|
| | |
| |
| |
| | |
The bridge descriptor manager is going to want this.
|
| |/ |
|
| |
|
|
|
| |
These are needed to actually be able to build circuits through
a bridge.
|
| |
|
|
|
|
|
|
|
| |
To implement a reasonable RsaIdentity accessor, we have to
store the RsaIdentity in the RouterDesc, or else we'd have to
recalculate it using SHA1 and DER every time.
The Ed25519 identity is hidden inside the identity cert, but it's
safe to get a reference to it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The warning `clippy::bool_to_int_with_if` is meant to shout at you
when you say `if x { 1 } else { 0 }` and instead suggest that you
say `inttype::from(x)`.
I agreed with this for the case in tor-cert, where we are literally
converting a boolean into a flag.
I don't agree with this in tor-netdoc, where we are using a boolean
to decide how many fields to skip in a given document format. So
for this case, I decided to clean up the code a little by renaming
"skip" to "n_skip", and changing the boolean to use an enum instead.
|
| |
|
|
| |
Their omission was an oversight.
|
| | |
|
| | |
|
| |
|
|
|
| |
Otherwise a caller who has a set of parameters must open-code the
loop.
|
| | |
|
| |
|
|
| |
and propagate to other affected crates
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Some of these were for decoding particular objects (we now say
what kind of objects), and some were unrelated tor_cert errors that
for some reason we had shoved into a tor_bytes::Error.
There is now a separate tor_cert::CertError type, independent from
tor_cert's use of `tor_bytes::Error` for parsing errors.
|
| |
|
|
|
|
|
|
| |
(This is slightly different from recovering from errors in the
middle of a list of mds, since in this case we _can't_ advance to the
next md.)
Also, note that a given branch is probably not reachable.
|
| |
|
|
|
| |
The "bad-id" microdescriptor is hand-edited based on one from a
Chutney network.
|
| | |
|
| |
|
|
| |
It's a little overzealous sometimes, but it's mostly to the good.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Relay nicknames are always between 1 and 19 characters long, and
they're always ASCII: That means that storing them in a [u8;19] will
always be possible, and always use less resources than storing them
in a String.
Fortunately, the tinystr crate already helps us with this kind of
thing.
|
| | |
|
| |
|
|
|
| |
Remove all `use` statements for `TryFrom` and `TryInto`. These are
now redundant in Rust 2021.
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit uses the `visibility` and `visible` crates to
conditionally make certain structs and their fields public
(respectively). This is incredibly dangerous to use for anything
besides testing, and I've tried to write the documentation for the
feature accordingly.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Don't use SystemTime::now()
Closes #306
See merge request tpo/core/arti!365
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Now we use NetParams. That implies making its constructor public,
which I think it fine.
This is related to #413 but is far from completing that ticket.
|