summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | tor-netdoc: types/misc.rs: Remove a stray comma in a docIan Jackson2026-04-141-1/+1
| | | | |
| * | | | tor-netdoc: types/misc.rs: Use fmt and Display aliasesIan Jackson2026-04-141-12/+12
| | | | | | | | | | | | | | | | | | | | This reduces clutter some more.
| * | | | tor-netdoc: types/misc.rs: Use FromStr aliasIan Jackson2026-04-141-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in the use's at the top of the file. If we `use super::*` (like we do in the newer modules): the code can get a lot more readable.
| * | | | tor-netdoc: Provide B16U for printing hex uppercaseIan Jackson2026-04-142-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test the parsing and printing success cases. Given that the parsing implementation is just a wrapper around B16's, we don't need explicit tests for that.
| * | | | tor-netdoc: Make B16 pub and improve its APIIan Jackson2026-04-142-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Make this a public BytesTransparent newtype like B64, implementing all the same traits etc.
| * | | | tor-netdoc: impl Display for B16, as lowercaseIan Jackson2026-04-141-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On reflection, and looking at the test cases, I think the name `B16` should refer to the lowercase version. I'll introduce a type for uppercase in a moment. Test the display implementation.
| * | | | tor-netdoc: Clean up base16 testIan Jackson2026-04-141-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the open-coded .parse() calls with a closure. This will let us test round trips, other types, etc., for each pairs of test values.
| * | | | tor-netdoc: Adjust API of B64Ian Jackson2026-04-142-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, make its field pub. Secondly, make the into_array method crate-private. It has a crate-specific (albeit public) error type, The same basic effect can be achieved with methods from std on arrays and slices.
| * | | | tor-netdoc: Use BytesTransparent for FixedB64, and make it pubIan Jackson2026-04-142-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this type public. The new macro call means this type now implements many more traits.
| * | | | tor-netdoc: impl many more traits for B64, by improving Bytes TransparentIan Jackson2026-04-142-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | I think these are all the traits that a parsing/printing newtype adapter ought to implement.
| * | | | tor-netdoc: types/misc.rs: Introduce BytesTransparent macro (finish macro)Ian Jackson2026-04-141-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually make the macro be a proper d-d macro. Replace uses of .0 with $fname, B64 with $ftype, etc. No functional change in this commit.
| * | | | tor-netdoc: types/misc.rs: Introduce BytesTransparent macro (code motion)Ian Jackson2026-04-141-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break various open-coded impls on B64 into this macro. That will let us reuse this code for other types, making all these bytes wrappers similar to each other. In this commit, we just move the code. The macro is wrong because it ought to refer to $ttype and so on. Review with git show --color-moved. No functional change in this commit.
| * | | | tor-netdoc: Move a Hash deriveIan Jackson2026-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This is slightly more logical and will make the next commit slightly easier to read.
| * | | | tor-netdoc: Move some imports to the top of types/misc.rsIan Jackson2026-04-141-3/+3
|/ / / / | | | | | | | | | | | | This will reduce some duplication and simplify some macrology.
* | | | Merge branch 'id-logging' into 'main'Jim Newsome2026-04-131-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Tweak TunnelId and TunnelScopedCircId Display impls See merge request tpo/core/arti!3875
| * | | | Tweak Display for TunnelScopedCircIdJim Newsome2026-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Circuit IDs (UniqId) are displayed as "Circ <x>.<y>". Prior to this MR, these TunnelScopedCircId's were displayed as "Circ <t>.<x>.<y>" where t is the integer tunnel ID. This made corresponding logs a bit confusing as to why some "Circ" identifiers had two parts and some have three, and didn't make clear that the "<x>.<y>" part of the latter were comparable with the two-part UniqIds. The previous commit effectively changes the latter to "Circ Tunnel <t>.<x>.<y>", which is still a bit confusing. This commit changes the display of TunnelScopedCircId's to "Circ <x>.<y> (Tunnel <t>)", which makes the distinction between the circuit and tunnel IDs clearer.
| * | | | Tunnel ID: included "Tunnel" type-specifier in DisplayJim Newsome2026-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is akin to how circuit `UniqId`'s are prefixed with "Circ", and helps clarify logs where it isn't always clear from context whether a tunnel ID or circuit ID is being displayed.
* | | | | Merge branch 'rand-update' into 'main'Nick Mathewson2026-04-132-42/+49
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Update to rand 0.90.3 and 0.10.1 See merge request tpo/core/arti!3880
| * | | | | Ignore RUSTSEC-2026-0097, for the benefit of rand 0.8.x.Ian Jackson2026-04-131-0/+7
| | | | | |
| * | | | | Update to rand 0.90.3 and 0.10.1Ian Jackson2026-04-131-42/+42
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes RUSTSEC-2026-0097. This is an unsoundness bug resulting from unexpected reentranccy if the whole program contains both of the following 1. rand with the log feature enabled 2. logging hook that calls rand Both of these are a priori quite unlikely. I checked with "cargo tree" that our uses of rand do not end up depending on log, so I think nothing in our tree enables the rand log feature.
* | | | | Merge branch 'contact-info' into 'main'Clara Engler2026-04-133-3/+100
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: ContactInfo See merge request tpo/core/arti!3866
| * | | | | tor-netdoc: ContactInfo: Fix unused attributeIan Jackson2026-04-091-3/+1
| | | | | |
| * | | | | tor-netdoc: ContactInfo: Add some roundtrip testsIan Jackson2026-04-081-0/+30
| | | | | |
| * | | | | tor-netdoc: ContactInfo: Use FromStr impl for netdoc item parsingIan Jackson2026-04-081-5/+15
| | | | | |
| * | | | | tor-netdoc: ContactInfo: derive Display tooIan Jackson2026-04-081-1/+1
| | | | | |
| * | | | | tor-netdoc: ContactInfo: Impose a syntax restrictionIan Jackson2026-04-081-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise you might, for example, receive a String from a config file, JSON API submission, RPC call, or whatever, containing a newline, and then encode it into a netdoc giving a syntax error or, worse, smuggling additional items into the document!
| * | | | | tor-netdoc: ContactInfo: semver entryIan Jackson2026-04-081-0/+1
| | | | | |
| * | | | | tor-netdoc: ContactInfo: derive ItemValueEncodableIan Jackson2026-04-081-0/+1
| | | | | |
| * | | | | tor-netdoc: ContactInfo: Use d_d_adhoc technique to de-cfgIan Jackson2026-04-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise the cfg_attr for the field would need to name both features.
| * | | | | tor-netdoc: ContactInfo: Improve doc with an xref and item nameIan Jackson2026-04-081-1/+5
| | | | | |
| * | | | | tor-netdoc: Add ContactInfoClara Engler2026-04-082-1/+13
| | | | | |
* | | | | | Merge branch 'create-fast' into 'main'gabi-2502026-04-136-14/+69
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Give our Ed25519 identity to the channel reactor See merge request tpo/core/arti!3877
| * | | | | | tor-proto: small comment improvementSteven Engler2026-04-091-1/+2
| | | | | | |
| * | | | | | tor-proto: replace a tuple with a dedicated structSteven Engler2026-04-092-18/+29
| | | | | | |
| * | | | | | tor-proto: give our ed ident to the channel reactorSteven Engler2026-04-096-5/+48
|/ / / / / / | | | | | | | | | | | | | | | | | | This will be needed for ntor handshakes.
* | | | | | Merge branch 'ntor-keeeeys' into 'main'gabi-2502026-04-096-62/+366
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti-relay: Generate and rotate ntor keys Closes #2451 See merge request tpo/core/arti!3874
| * | | | | | proto: Apply deferred rustfmtGabriela Moldovan2026-04-091-1/+1
| | | | | | |
| * | | | | | arti-relay: Use a SmallVec for the ntor keysGabriela Moldovan2026-04-093-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually, there will only be two of these.
| * | | | | | proto: Add method for installing ntor keys in the create handlerGabriela Moldovan2026-04-092-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also updates the key rotation task to call the setter whenever the ntor keys get updated.
| * | | | | | arti-relays: Pass a CreateRequestHandler to the crypto task (fmt)Gabriela Moldovan2026-04-091-3/+8
| | | | | | |
| * | | | | | arti-relays: Pass a CreateRequestHandler to the crypto taskGabriela Moldovan2026-04-093-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will need to be updated each time the ntor keys change.
| * | | | | | arti-relay: Add tests for the ntor key rotationGabriela Moldovan2026-04-091-0/+53
| | | | | | |
| * | | | | | arti-relay: Test that 1 ntor key gets generated on first runGabriela Moldovan2026-04-091-0/+7
| | | | | | |
| * | | | | | arti-relay: Dedupe test helperGabriela Moldovan2026-04-091-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am about to add another one of these, so I tried to deduplicate the impls a bit.
| * | | | | | arti-relays: Extend existing tests to check ntor key rotation (fmt)Gabriela Moldovan2026-04-091-1/+4
| | | | | | |
| * | | | | | arti-relays: Extend existing tests to check ntor key rotationGabriela Moldovan2026-04-091-2/+6
| | | | | | |
| * | | | | | arti-relay: Generate and rotate ntor keysGabriela Moldovan2026-04-091-10/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is still some outstanding work here to read the lifetime and grace period from the consensus, but that will require some bigger changes to the rotation task. Closes #2451
| * | | | | | arti-relay: Add callbacks for deciding whether to expire and generateGabriela Moldovan2026-04-091-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for removing and generating ntor keys is going to be slightly different here.
| * | | | | | arti-relay: Replace have_rotated bools with KeyChange (fmt)Gabriela Moldovan2026-04-091-8/+14
| | | | | | |
| * | | | | | arti-relay: Replace have_rotated bools with KeyChangeGabriela Moldovan2026-04-091-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will enable us to plug in the ntor key rotation logic.