summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | GuardMgr: Use installed netdir provider when we want a netdirNick Mathewson2022-06-071-20/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of our existing code optionally takes a netdir from the caller. When it doesn't give us one, use the netdir from the installed NetDirProvider. (Possibly someday we should remove the NetDir arguments entirely. I'm deferring that because there are only two APIs affected, and because making this change would force us to rewrite a pretty large mess of unit tests.)
| * | | | | Move responsibility for GuardMgr NetDir updates to GuardMgr.Nick Mathewson2022-06-074-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was the job of a task in CircMgr to do this; but we're going to want to give GuardMgr full access to the latest NetDir for this, and for other code-simplification reasons. With this change I'm deprecating a couple of functions in tor-circmgr. It's no longer necessary for us to have an artificial external way for you to feed new NetDirs to a circmgr. (I could just remove them, but I want practice deprecating.)
| * | | | | Remove now-redundant Send+Sync constraints alongside NetDirProviderNick Mathewson2022-06-073-8/+8
| | | | | |
| * | | | | Make NetDirProvider require Send and Sync.Nick Mathewson2022-06-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our own code is the only stuff that consumes NetDirProvider, and all the code that consumes it wants it to be Send and Sync. Making this change avoids our having to define a new function to upcast Arc<dyn Foo> to Arc<dyn NetDirProvider + Send + Sync>.
| * | | | | Add an upcast_arc function to NetDirProvider.Nick Mathewson2022-06-021-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses some apparently-standard trickery to implement a function that lets us upcast from Arc<dyn Subtrait> to Arc<dyn Supertrait>. I considered as alternatives `as_dyn_trait` and `cast_dyn_object`. Both were nice, but generated a far larger interface than this.
* | | | | | Merge branch 'tor-netdoc-tests' into 'main'Nick Mathewson2022-06-0712-24/+199
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scattered tests throughout tor-netdoc See merge request tpo/core/arti!562
| * | | | | | Netdoc tests: extract decode-base64-ignore-ws code.Nick Mathewson2022-06-071-10/+13
| | | | | | |
| * | | | | | microdesc: make sure we recover from an error in the final md.Nick Mathewson2022-06-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
| * | | | | | netdoc: test case for microdesc with no ed25519 id.Nick Mathewson2022-06-072-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "bad-id" microdescriptor is hand-edited based on one from a Chutney network.
| * | | | | | netdoc: test a couple of accessors for AuthCert.Nick Mathewson2022-06-071-1/+11
| | | | | | |
| * | | | | | Netdoc: test enforcement for items that mustn't take objects.Nick Mathewson2022-06-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via coverage.
| * | | | | | netdoc: remove an unused method.Nick Mathewson2022-06-071-12/+0
| | | | | | |
| * | | | | | netdoc: Test more accessors for tokenized documents.Nick Mathewson2022-06-072-4/+20
| | | | | | |
| * | | | | | Netdoc: add accessor to error for ParseErrorKindNick Mathewson2022-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kind type was already public, but we didn't give the user any way to get it.
| * | | | | | netdoc: tests for parsing UnvalidatedEdCert.Nick Mathewson2022-06-071-1/+47
| | | | | | |
| * | | | | | tor-cert: Make more types Clone and Debug.Nick Mathewson2022-06-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Not sure how we missed this before. This is part of making more of tor-netdoc tested.)
| * | | | | | Tests for netdoc RsaPublic type.Nick Mathewson2022-06-071-2/+37
| | | | | | |
| * | | | | | Fix a copy-paste error in Ed25519 parsing tests.Nick Mathewson2022-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accidentally tried to validate (invalid) ed25519 keys as curve25519 keys.
| * | | | | | Add test for parsing bad tor version with too many elements.Nick Mathewson2022-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a coverage-driven test.
| * | | | | | Add test for mutability of RelayFamily.Nick Mathewson2022-06-011-0/+9
| | | | | | |
| * | | | | | Tests for tor_netdoc::util::internNick Mathewson2022-06-011-0/+33
| | |_|/ / / | |/| | | |
* | | | | | Merge branch 'ticket463_01-cell' into 'main'Ian Jackson2022-06-076-1/+599
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cell: Implement UDP cell ABI See merge request tpo/core/arti!542
| * | | | | | udp: New AddressPort used in cellsDavid Goulet2022-06-072-42/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | udp: Allow empty hostname and no nul byteIan Jackson2022-06-073-34/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After changes to the prop339, the domain name in an Address can only be 255 bytes max and can NOT contain nul byte(s). Unit tests had to be modified to accept this change: - Centralise msg_ip_address - Add currently-passing tests for address length - Test counted address length longer than type wants Related to #463 Signed-off-by: David Goulet <[email protected]>
| * | | | | | cell: Don't use NUL terminated string in CONNECT_UDPDavid Goulet2022-06-073-43/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | cell: Move UDP to its own module and feature gate itDavid Goulet2022-06-076-314/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to #463 Signed-off-by: David Goulet <[email protected]>
| * | | | | | cell: Implement DATAGRAM cell from prop339David Goulet2022-06-072-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoding and encoding of the DATAGRAM cell from proposal 339. Related to #463. Signed-off-by: David Goulet <[email protected]>
| * | | | | | cell: Implement CONNECTED_UDP cell from prop339David Goulet2022-06-072-5/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoding and encoding implemented according to proposal 339. Related to #463
| * | | | | | cell: Implement CONNECT_UDP cell from prop339David Goulet2022-06-075-4/+622
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoding and encoding is implemented according to proposal 339 specifications. Related to #463 Signed-off-by: David Goulet <[email protected]>
* | | | | | Merge branch 'llcrypto-openssl' into 'main'Nick Mathewson2022-06-074-0/+144
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add support for openssl backend in llcrypto Closes #442 See merge request tpo/core/arti!550
| * | | | | | use the right feature name for llcrypto openssltrinity-1686a2022-05-312-5/+5
| | | | | | |
| * | | | | | add support for openssl backend in llcryptotrinity-1686a2022-05-304-0/+144
| | | | | | |
* | | | | | | Merge branch 'updates-20220607' into 'main'Ian Jackson2022-06-076-21/+23
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Update a few dependencies to more recent versions See merge request tpo/core/arti!570
| * | | | | | Upgrade serial_test dev-dependency to 0.7.0Nick Mathewson2022-06-072-6/+7
| | | | | | |
| * | | | | | Upgrade float_eq dev-dependency to 1.0.0Nick Mathewson2022-06-074-5/+5
| | | | | | |
| * | | | | | Upgrade tls-api to latest versions in arti-hyper.Nick Mathewson2022-06-072-10/+11
|/ / / / / /
* | | | | | Merge branch 'typos' into 'main'Nick Mathewson2022-06-053-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typos See merge request tpo/core/arti!567
| * | | | | | Fix typosDimitris Apostolou2022-06-053-6/+6
|/ / / / / /
* | | | | | Merge branch 'testing-rng' into 'main'Nick Mathewson2022-06-024-0/+344
|\ \ \ \ \ \ | |_|_|/ / / |/| | | / / | | |_|/ / | |/| | | New facility for deterministic and reproducible test PRNGs. See merge request tpo/core/arti!561
| * | | | New facility for deterministic and reproducible test PRNGs.Nick Mathewson2022-06-024-0/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new `testing_rng()` function is meant as a replacement for thread_rng() for use in unit tests. By default, it uses a randomly seeded RNG, but prints the seed before the test so that you can reproduce any failures that occur. You can override this via the environment to use a previous seed, or by using a deterministic seed for all your tests. Backend for #486.
* | | | | Merge branch 'check-license-fixes' into 'main'Ian Jackson2022-06-022-1/+20
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update check_licenses and add it to CI. Closes #462 See merge request tpo/core/arti!559
| * | | | | Add check_licenses to CI.Nick Mathewson2022-05-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The artifact-caching logic is taken from other examples in the .gitlab-ci.yml.
| * | | | | check_licenses: list new crates with manual license verificationNick Mathewson2022-05-311-1/+17
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #462. Note that the license on `ring` is slightly problematic for some users, including as it does old the openssl license[^1], with advertising clause and all. That's not a blocker for us now, since `ring` is not a required dependency. But we wouldn't want `ring` to become a mandatory dependency because of this. [^1]: To make the situation even more complicated, modern openssl has relicensed under apache-2.0, but that doesn't necessarily help us, since ring took its code from boringssll, which forked from an older version of openssl.
* | | | | Merge branch 'better-fs-mistrust-badpermissions-string' into 'main'Ian Jackson2022-06-024-29/+43
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fs-mistrust: Improve BadPermission string See merge request tpo/core/arti!554
| * | | | | fs-mistrust: Improve BadPermission stringAlex Xu (Hello71)2022-05-313-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To me, "Incorrect permissions on file or directory /path: g=w o=w" implies that the current permissions on /path are 022. Change the message to "Incorrect permissions: /path is u=rwx,g=rwx,o=rwx; need g-w,o-w", which is closer to chmod syntax and is more useful in non-interactive environments such as CI and support.
| * | | | | fs-mistrust: BadPermission(_, _) -> BadPermission(..)Alex Xu (Hello71)2022-05-313-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Next commit adds another parameter to Error::BadPermission.
* | | | | | Merge branch 'doc' into 'main'Nick Mathewson2022-06-011-1/+1
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | tor-config: Fix a doc link See merge request tpo/core/arti!563
| * | | | | tor-config: Fix a doc linkIan Jackson2022-06-011-1/+1
|/ / / / / | | | | | | | | | | | | | | | Nightly cargo doc complaints about this.
* | | | | Merge branch 'lint-followup' into 'main'Nick Mathewson2022-06-011-17/+35
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve maint/add_warning Closes #494 See merge request tpo/core/arti!560
| * | | | | maint/add_warning: Convert remaining assertsIan Jackson2022-05-311-4/+8
| | | | | |