Ian Jackson
68aacc2140
arti cfg tests: Suppress an undesriable clippy lint
2023-06-28 14:43:48 +01:00
Ian Jackson
464c5e5efa
arti cfg tests: declare_exceptions: Annotate the types for clarity (fmt)
2023-06-28 14:25:55 +01:00
Ian Jackson
5f20b0ec29
arti cfg tests: declare_exceptions: Annotate the types for clarity
2023-06-28 14:25:55 +01:00
Ian Jackson
14b1cc0cc1
arti cfg tests: Point the reader to the types used in declarations
2023-06-28 14:25:55 +01:00
Ian Jackson
2ff494d081
arti cfg tests: Move InCode into declare_config_example
...
It's used for declarations only, and they should all be here.
2023-06-28 14:25:55 +01:00
Ian Jackson
5672b75de2
arti cfg tests: Make declare_exception take distinguished old/new types
...
As per discussion in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1320#note_2916689
and IRC followup.
2023-06-28 14:23:13 +01:00
Ian Jackson
1be71b87d0
Merge branch 'config' into 'main'
...
tor-hsclient: Add configuration settings
See merge request tpo/core/arti!1305
2023-06-28 13:10:39 +00:00
Nick Mathewson
e06cd63ffd
Merge branch 'dirclient-semver-entry' into 'main'
...
Missing semver entry for new dirclient API from !1323
See merge request tpo/core/arti!1327
2023-06-28 12:58:19 +00:00
Ian Jackson
cf5235a713
HS timeout parameters: Restore some TODOs
...
Conceptually this is a fixup to
HS configuration: Add retry parameters to configuration
which erroneously removed these comments - they were intended to apply
to *all* these parameters, not just the max attempts.
Not marking it as fixup! because that would involve merge conflicts.
2023-06-28 13:32:54 +01:00
Ian Jackson
11bb7e8a90
HS configuration: Use configured maximum attempts - comment
...
Explain why this fallback to MAX is good.
Discussion
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1305#note_2915927
2023-06-28 13:32:54 +01:00
Ian Jackson
2bfe12983a
HS configuration: Use configured maximum attempts (fmt)
2023-06-28 13:32:54 +01:00
Ian Jackson
be33f00b31
HS configuration: Use configured maximum attempts
2023-06-28 13:32:54 +01:00
Ian Jackson
a0b6f34e42
HS configuration: Plumb configuration through (fmt)
...
Apply deferred rustfmt churn.
2023-06-28 13:32:54 +01:00
Ian Jackson
3ebc3216e3
HS configuration: Plumb configuration through (clippy)
...
Apply deferred clippy churn.
2023-06-28 13:32:54 +01:00
Ian Jackson
984652217a
HS configuration: Plumb configuration through
...
Invent a trait a la circmgr config for the hs client connector config.
Plumb a suitable value all the way through to the code that will use it.
2023-06-28 13:32:54 +01:00
Ian Jackson
cdad2db082
HS configuration: Add retry parameters to configuration
...
I think these should go in `[circuit_timing]`. That section already
has some retry parameters, so is not strictly *timing*.
This is not honoured yet.
2023-06-28 13:32:54 +01:00
Ian Jackson
cc25c82d4b
HS configuration: Add and honour `allow_onion_addrs` in configuration
...
We put this in `[address_filter]`.
The interaction with the corresponding stream preference is a bit
complicated. We must turn the stream pref into a `BoolOrAuto`.
2023-06-28 13:32:54 +01:00
Nick Mathewson
2bee27a737
Merge branch 'hsdir-identity' into 'main'
...
tor-hsclient: Completely hide hsdir identities in errors
See merge request tpo/core/arti!1326
2023-06-28 12:30:22 +00:00
Ian Jackson
88e3b7a147
Merge branch 'config2' into 'main'
...
Overhaul art's config tests
See merge request tpo/core/arti!1320
2023-06-28 12:25:37 +00:00
Gabriela Moldovan
70f468d0f1
keymgr: Downgrade some TODOs to "TODO HSS".
...
These don't need to be blockers for the next release.
2023-06-28 13:11:53 +01:00
Gabriela Moldovan
928a9cd7ca
keymgr: Remove outdated TODOs regarding error handling.
...
These were tackled in #901 .
2023-06-28 13:07:52 +01:00
Nick Mathewson
42e4929226
Missing semver entry for new dirclient API from !1323
2023-06-28 08:06:32 -04:00
Ian Jackson
41737efced
tor-hsclient: Completely hide hsdir identities in errors
2023-06-28 13:02:44 +01:00
gabi-250
63a7b25711
art cfg tests: Fix garbled doc wording
2023-06-28 12:56:09 +01:00
gabi-250
d56f28bc6f
arti cfg tests: Fix doc comment
2023-06-28 12:56:09 +01:00
Ian Jackson
fa0fb50d80
CI: run a normal all-features-test
...
I think we do actually do this as part of the coverage job, but that's
not really very clear (and getting the report in that job may be
annoying).
We also do it on nightly as part of the nightly test, but that's an
"allow_fail".
2023-06-28 12:56:09 +01:00
Ian Jackson
ac38c862ec
arti cfg tests: Overhaul exception handling (fmt)
2023-06-28 12:56:09 +01:00
Ian Jackson
c0c0beb8e1
arti cfg tests: Overhaul exception handling
...
This was super confusing and fragile. Amongst the problems:
* Information about exceptional config keys was spread across a
number of places, manipulated in ad-hoc ways (conditional Vec
appends, etc).
* As a consequence, each exceptional table has confusing and unclear
semantics.
* It doesn't deal well with the way that cargo sometimes enables
features for dependency crates even if arti itself wouldn't demand
them; this can lead to sub-crates supporting config keys when the
tests in arti don't expect them to, causing spurious test failures.
Fix this:
* Introduce a new, systematic, way of writing information about
configuration keys that need some kind of special handling.
* Use this new approach in *both* sets of "thorough" config tests.
* Be more relaxed about deprecated keys. We don't want to tightly
couple this to absence in the supported file, I think.
* Understand more clearly the concept of keys of which we don't know,
in the current build config, whether the code is expected to
accept them.
I have tested this locally with:
for p in '-p arti' '--workspace'; do for f in '--no-default-features --features=tokio,native-tls' '--all-features' ''; do nailing-cargo test $p $f; done; done
2023-06-28 12:56:09 +01:00
Ian Jackson
479ed9d168
arti cfg tests: Remove a comment relating to work already done
...
We *do* have a thing that works like this.
It's fragile and confusing and that's what I'm about to fix.
2023-06-28 12:56:09 +01:00
Ian Jackson
0cde6134d0
arti cfg tests: Code motion
...
Bring the exciting tests together, and move some more normal tests out
of the middle.
2023-06-28 12:56:09 +01:00
Ian Jackson
2656b8fa04
geoip: conditionalise a test
...
Without this, the build fails with
cargo test --workspace --no-default-features --features=tokio,native-tls
2023-06-28 12:56:09 +01:00
Ian Jackson
ebb3455b3e
Conditionalise an import
...
Fixes a warning with
cargo clippy --locked --offline --workspace --all-targets
2023-06-28 12:56:09 +01:00
Ian Jackson
a6aa113865
Mark a builder as non-exhaustive
...
If all the fields vanish, this generates a warning with
cargo clippy --locked --offline --workspace --all-targets
Fix that.
2023-06-28 12:56:09 +01:00
gabi-250
6b8218f960
Merge branch 'keymgr-error-kind' into 'main'
...
keymgr: Implement ErrorKind for keymgr error types
See merge request tpo/core/arti!1315
2023-06-28 11:34:23 +00:00
Alexander Færøy
26c4a274c7
Merge branch 'dirclient-todos' into 'main'
...
Resolve remaining dirclient HS todos
See merge request tpo/core/arti!1323
2023-06-28 11:33:32 +00:00
Gabriela Moldovan
dff8c0163b
keymgr: Implement HasKind for ArtiNativeKeystoreError.
2023-06-28 11:59:00 +01:00
Gabriela Moldovan
6ed8f5b9ea
tor-error: Add KeystoreAccessFailed, KeystoreFsPermissions to ErrorKind.
2023-06-28 11:59:00 +01:00
Gabriela Moldovan
ef1c969c73
keymgr: Implement HasKind for SshKeyError.
2023-06-28 11:59:00 +01:00
Gabriela Moldovan
c8a128cc59
tor-error: Add KeystoreCorrupted to ErrorKind.
2023-06-28 11:59:00 +01:00
Nick Mathewson
f778d32a0e
Merge branch 'ticket_914' into 'main'
...
Remove support for receiving unauthenticated SENDMEs.
Closes #914
See merge request tpo/core/arti!1283
2023-06-28 10:54:05 +00:00
Nick Mathewson
6f3761c24f
dirclient: use correct default max_len
...
Yes, it's 50 kilobytes, not 50 kibibytes. I double-checked this with
the C implementation and with param-spec.txt's documentation for
`HSV3MaxDescriptorSize`.
2023-06-27 16:21:29 -04:00
Nick Mathewson
4692dba5e0
hsclient: Use HsDescDownloadRequest::set_max_len.
2023-06-27 16:21:29 -04:00
Nick Mathewson
32e3cde3fd
dirclient: Correct an erroneous comment.
2023-06-27 16:21:29 -04:00
Nick Mathewson
38db06ee4b
dirclient: Make maximum hsdesc length adjustable.
2023-06-27 16:21:29 -04:00
Nick Mathewson
01ea20759b
dirclient: Explain why hardcoding "3" is ok.
2023-06-27 16:04:49 -04:00
Gabriela Moldovan
e332caf562
keymgr: Remove unneeded error variant.
...
The `Unsupported` variant is no longer needed now that we support
`KeyType::X25519StaticSecret`s.
2023-06-27 20:11:07 +01:00
Gabriela Moldovan
7732ac131b
keymgr: Add support for x25519 keys.
2023-06-27 20:11:07 +01:00
Gabriela Moldovan
257797fff6
keymgr: Return a concrete type from read_ed25519_keypair.
...
This also fixes a bug which caused the function to always return a
type-erased `()` instead of the actual key!
2023-06-27 20:11:07 +01:00
Gabriela Moldovan
b91a1c2859
keymgr: Move TODO closer to the code it refers to.
2023-06-27 20:11:07 +01:00
Gabriela Moldovan
c114c413c2
keymgr: Map KeyType::X25519StaticSecret to an SshKeyAlgorithm.
2023-06-27 20:11:07 +01:00