summaryrefslogtreecommitdiff
path: root/Cargo.lock
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-keymgr: Add ArtiNativeKeystoreConfig.Gabriela Moldovan2023-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the keystore config consisted of a single field in `StorageConfig`, which encoded 2 bits of information: whether the keystore is enabled, and its root directory: ``` [storage] # use this path, fail if compiled out # keystore = "/path/to/arti/keystore" # # use default path, fail if compiled out # keystore = true # # disable # keystore = false ``` This commit adds `ArtiNativeKeystoreConfig`, which will replace the multi-purpose `keystore` field. The new config will look like this: ``` #[storage.keystore] # Whether the keystore is enabled. # # If the `keymgr` feature is enabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # * set to true, the configured keystore, or the default keystore, if the # keystore path is not specified, will be used # # If the `keymgr` feature is disabled and this option is: # * set to false, we will ignore the configured keystore path. # * set to "auto", we will ignore the configured keystore path. # # Setting this option to true when the `keymgr` feature is disabled is a # configuration error. #enabled = "auto" # The root directory of the arti keystore #path = "${ARTI_LOCAL_DATA}/keystore" ``` While `ArtiNativeKeystoreConfig` currently only has 2 fields, `enabled` and `path`, future versions of the keystore might require additional config options.
* | Add country codes to relays inside a NetDireta2023-07-131-0/+1
|/ | | | | | | | | | | | - When the `geoip` feature flag of `tor-netdir` is enabled, perform GeoIP lookups for all relays added to the directory and add the resulting country code to the `Relay` struct. - The GeoIP database is provided in a new `PartialNetDir::new_with_geoip` constructor. - A new trait was also added to `tor-linkspec`, `HasCountryCode`, to enable getting this data out from other crates. Part of onionmasq#47.
* rng ranges: Use gen_range_infallible() for Duration::ZERO..=TIan Jackson2023-07-101-0/+1
|
* keymgr: Use Box<dyn EncodableKey> instead of Box<dyn Any>.Gabriela Moldovan2023-07-101-0/+1
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1337#note_2917701 This will make it harder to accidentally return the wrong value from `Keystore::get` (the returned value is now at least guaranteed to implement `EncodableKey`). Closes #937
* Merge branch 'da-task' into 'main'gabi-2502023-07-101-0/+28
|\ | | | | | | | | RFC: tor-rtmock: Use derive-adhoc for composite runtimes See merge request tpo/core/arti!1381
| * tor-rtmock: Use derive-adhoc for composite runtimesIan Jackson2023-07-071-0/+28
| |
* | tor-error: tracing module: Use macro to generate macrosIan Jackson2023-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | This abolishes some quintuplication. The output is identical except that: * The syntax display in the rustdoc output for the resulting macros seems to have somewhat less whitepsace. * The whimsical error messages in the examples are all identical. Ah well.
* | event_report: assert correctness of format endingNick Mathewson2023-07-071-0/+1
| | | | | | | | | | (Also, document that this static assertion is the reason why you are seeing a confusing error message.)
* | tor-error: Add optional tracing supportNick Mathewson2023-07-071-0/+1
|/ | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* Merge branch 'task4' into 'main'Ian Jackson2023-07-061-1/+7
|\ | | | | | | | | Introduce a MockExecutor for fully-isolated test cases See merge request tpo/core/arti!1375
| * tor-dirmgr: bridge descriptor tests: Use MockRuntime (drop Tokio dep)Ian Jackson2023-07-061-1/+0
| | | | | | | | This isn't used any more.
| * tor-rtmock: MockRuntime: provide test_with_variousIan Jackson2023-07-061-0/+1
| | | | | | | | In both fallible and infallible variants, for convenience.
| * tor-rtmock: MockExecutor: Configurable scheduling policyIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Provide MockRuntimeIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Unit tests for MockExecutorIan Jackson2023-07-061-0/+1
| |
| * tor-rtmock: Provide MockExecutorIan Jackson2023-07-061-0/+3
| |
* | Merge branch 'log_precision' into 'main'Nick Mathewson2023-07-061-0/+4
|\ \ | |/ |/| | | | | | | | | arti: Add a `logging.time_granularity` option with 1s default. Closes #551 See merge request tpo/core/arti!1376
| * arti: Add a `logging.time_granularity` option with 1s default.Nick Mathewson2023-07-061-0/+4
| | | | | | | | | | | | | | This lets us provide less information in our logs: in particular, it lets us avoid logging with microsecond precision. Closes #551.
* | arti: Install a panic hook that sends messages to `tracing`Nick Mathewson2023-07-051-0/+1
|/ | | | | | | (Also leaves installed the default handler that sends messages to stderr.) Closes #921.
* fix audittrinity-1686a2023-07-041-3/+3
|
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* Bump minor versions on crates with breaking changesNick Mathewson2023-06-301-4/+4
| | | | | | | | | | Done with: ``` cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p arti-rpcserver cargo set-version --bump minor -p tor-hscrypto cargo set-version --bump minor -p tor-cell ```
* Bump versions on crates with nonfunctional changesNick Mathewson2023-06-301-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had nonfunctional changes only, mostly due to !1271, or ac90cb7500f2f108, or documentation changes: crates that depend on them do not require a version bump. ``` arti-bench arti-config arti-hyper arti-testing caret fs-mistrust retry-error tor-async-utils tor-basic-utils tor-chanmgr tor-checkable tor-congestion tor-consdiff tor-events tor-guardmgr tor-persist tor-protover tor-ptmgr tor-rtcompat tor-rtmock tor-units ```
* keymgr: Remove ArtiPath normalization, introduce additional restrictions.Gabriela Moldovan2023-06-291-13/+23
|
* Merge branch 'update' into 'main'Ian Jackson2023-06-291-188/+212
|\ | | | | | | | | Run "cargo update" in preparation for Friday release. See merge request tpo/core/arti!1338
| * Run "cargo update" in preparation for Friday release.Nick Mathewson2023-06-291-188/+212
| |
* | Merge branch 'netdir_by_rsa_experimental_apis' into 'main'Nick Mathewson2023-06-291-0/+1
|\ \ | | | | | | | | | | | | netdir: Conditionally expose APIs for working with unusable relays; document what "usable" means. See merge request tpo/core/arti!1325
| * | netdir: Conditionally expose some by_rsa APIs as experimental.Nick Mathewson2023-06-291-0/+1
| |/ | | | | | | | | | | | | Network-health wants these to see whether a given relay is listed in the consensus. cc @juga
* / keymgr: Add tests for ArtiNativeKeyStore::key_path.Gabriela Moldovan2023-06-291-0/+1
|/
* HS configuration: Add retry parameters to configurationIan Jackson2023-06-281-0/+1
| | | | | | | 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.
* arti cfg tests: Overhaul exception handlingIan Jackson2023-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Back down x25519-dalek to 2.0.0-pre.1 from 2.0.0-rc.2pinkforest2023-06-271-50/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================= Notes from nickm: (This differs from pinkforest's original MR: It removes the Cargo.lock changes and the version bump on tor-llcrypto.) Minimal Cargo.lock changes from downgrade. (These are exactly those changes generated by running "build" and "test".) There are several reasons to do this: * It's best to bump all of our dalek dependencies at once to rc.3 or later, rather than the piecemeal approach we've been stuck with so far. * We don't want to do this bump right now, since there are some tricky questions about clamping we need to figure out (see #808), and we need to make sure we get them right, and we're in a distracted this week. * We _do_ need to move away from 2.0.0-rc.2 right now, since it was causing a failure in `cargo install arti`, and then it got yanked. Thanks to pinkforest for helping us out here and explaining all of this! Fixes #926. Commit-edited-by: Nick Mathewson <[email protected]>
* Merge branch 'upgrade-itertools' into 'main'gabi-2502023-06-261-2/+2
|\ | | | | | | | | Upgrade to itertools 0.11.0 See merge request tpo/core/arti!1306
| * Upgrade to itertools 0.11.0Nick Mathewson2023-06-261-2/+2
| | | | | | | | The breaking changes here do not seem to affect us.
* | keymgr: Create a KeyStoreError trait for keystore errors.Gabriela Moldovan2023-06-261-0/+1
|/ | | | | | The new `BoxedError` type will replace `tor_keymgr::Error`. Part of #901
* netdoc: Use a dev-dependency on anyhow to fix a doc exampleNick Mathewson2023-06-221-0/+1
|
* Merge branch 'socks_errorkinds' into 'main'Nick Mathewson2023-06-221-0/+1
|\ | | | | | | | | | | | | Generate correct-ish socks5 errors for onion service errors. Closes #736 See merge request tpo/core/arti!1279
| * New ErrorKind for invalid onion addressesNick Mathewson2023-06-221-0/+1
| | | | | | | | Use this to emit HS_BAD_ADDRESS as appropriate.
* | Merge branch 'hsdesc-accessors' into 'main'Ian Jackson2023-06-211-0/+48
|\ \ | | | | | | | | | | | | | | | | | | netdoc: Use derive amplify::Getters for HsDesc accessors. Closes #909 See merge request tpo/core/arti!1266
| * | netdoc: Use derive amplify::Getters for HsDesc accessors.Nick Mathewson2023-06-201-0/+48
| | | | | | | | | | | | Closes #909.
* | | Upgrade to memmap2 0.7Nick Mathewson2023-06-211-2/+2
| | |
* | | Upgrade to strum 0.25.Nick Mathewson2023-06-211-5/+5
| |/ |/|
* | Merge branch 'geoip-nullity-fromstr' into 'main'Nick Mathewson2023-06-211-0/+1
|\ \ | | | | | | | | | | | | Followups wrt country-code robustness See merge request tpo/core/arti!1268
| * | geoip: Make ?? a little more bullet-proofNick Mathewson2023-06-201-0/+1
| | | | | | | | | | | | We want to make sure that ?? is always None, never a CountryCode.
* | | Bump openssl because RUSTSEC-2023-0044Ian Jackson2023-06-211-4/+4
| | |
* | | Merge branch 'keymgr-refactor-fs-ops' into 'main'gabi-2502023-06-201-0/+1
|\ \ \ | |/ / |/| | | | | | | | keymgr: Move FS operations out of KeyType impl See merge request tpo/core/arti!1263
| * | keymgr: Move FS operations out of ssh.rsGabriela Moldovan2023-06-201-0/+1
| |/ | | | | | | | | | | | | This moves the filesystem calls from the `ssh` module to `ArtiNativeKeyStore`. While `ArtiNativeKeyStore` shouldn't be concerning itself with filesystem operations either, that refactoring will be tackled separately (see arti#899).
* | Merge branch 'add-tor-geoip' into 'main'Nick Mathewson2023-06-201-2/+18
|\ \ | |/ |/| | | | | tor-geoip: Add new crate with GeoIP database functionality See merge request tpo/core/arti!1239
| * tor-geoip: Add new crate with GeoIP database functionalityeta2023-06-201-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This adds a new crate, `tor-geoip`, which can parse and perform lookups in the GeoIP database C-tor already uses (generated by a maintenance utility in the C-tor codebase). - We embed a copy of C-tor's databases with the crate and use `include_str!` to ship them with the binary, bloating its size somewhat. - This does, however, solve the problem of figuring out how to distribute these. - The plan is to gate this functionality behind a feature flag anyway, so the cost should be nil unless explicitly opted into. Part of tpo/core/onionmasq#47.
* | keymgr: Add an error variant for fs_mistrust errors.Gabriela Moldovan2023-06-201-0/+1
| | | | | | | | | | This will be useful later, when `KeyMgr` will start validating permissions and paths.