Commit Graph

6697 Commits

Author SHA1 Message Date
Nick Mathewson 69c9347875 changelog: mention support of --document-private-items 2023-05-02 19:10:20 -04:00
Nick Mathewson af79333bf7 changelog: correct location of SinkPrepareExt. 2023-05-02 19:05:39 -04:00
Alexander Færøy 5ff19678fe Merge branch 'relayid' into 'main'
RelayId: Remove some duplication and relax a lifetime

See merge request tpo/core/arti!1156
2023-05-02 17:55:07 +00:00
Alexander Færøy 6e157a5389 Merge branch 'arti-client-doc-test' into 'main'
arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.

Closes #843

See merge request tpo/core/arti!1166
2023-05-02 17:54:11 +00:00
Gabriela Moldovan dfc22beddf
netdoc: Mark parse_decrypt_validate as experimental.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-02 17:18:53 +01:00
Gabriela Moldovan 6cb412558d
arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.
One of the tests run as part of `cargo test -p arti-client` fails
because the `pt-client` feature is not enabled by default:

```
failures:

---- src/config.rs - config::BridgesConfig (line 221) stdout ----
error[E0432]: unresolved import `arti_client::config::pt`
 --> src/config.rs:225:26
  |
7 | use arti_client::config::pt::ManagedTransportConfigBuilder;
  |                          ^^ could not find `pt` in `config`

error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope
  --> src/config.rs:233:19
   |
15 | builder.bridges().bridges().push(bridge_1);
   |                   ^^^^^^^ private field, not a method

error[E0599]: no function or associated item named `default` found for struct `BridgeConfigBuilder` in the current scope
  --> src/config.rs:236:48
   |
18 | let mut bridge2_builder = BridgeConfigBuilder::default();
   |                                                ^^^^^^^ function or associated item not found in `BridgeConfigBuilder`

error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope
  --> src/config.rs:247:19
   |
29 | builder.bridges().bridges().push(bridge2_builder);
   |                   ^^^^^^^ private field, not a method

error[E0599]: no method named `transports` found for mutable reference `&mut BridgesConfigBuilder` in the current scope
  --> src/config.rs:255:19
   |
37 | builder.bridges().transports().push(transport);
   |                   ^^^^^^^^^^ method not found in `&mut BridgesConfigBuilder`

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
Couldn't compile the test.

failures:
    src/config.rs - config::BridgesConfig (line 221)

test result: FAILED. 5 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 2.10s
```

This disables the `BridgesConfig` doc test if the `pt-client` feature is not enabled.

Closes #843

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-02 14:10:15 +01:00
Nick Mathewson ad61d02882 changelog: document one more semver issue. 2023-05-01 14:03:45 -06:00
Nick Mathewson 8b4a4a378e Start on a changelog for Arti 1.1.4 2023-05-01 14:02:02 -06:00
Nick Mathewson 6735040683 Add a couple of links to the top-level README.
Notably, I'm adding a note to the `arti` README, which includes
information on how to build and use the thing.
2023-05-01 11:36:49 -06:00
Nick Mathewson 17028b3934 Merge branch 'update_20230429' into 'main'
Run cargo update again. (Tracing 0.1.38 has been yanked)

See merge request tpo/core/arti!1162
2023-04-29 14:46:15 +00:00
Nick Mathewson 9ecc237c18 Run cargo update again. (Tracing 0.1.38 has been yanked) 2023-04-29 08:10:34 -06:00
Nick Mathewson 8a02d5b028 Merge branch 'update_20230428' into 'main'
Run cargo update in preparation for release next week

See merge request tpo/core/arti!1161
2023-04-28 21:34:58 +00:00
Nick Mathewson 6d28469ba1 Run cargo update in preparation for release next week 2023-04-28 15:09:03 -06:00
Nick Mathewson c716cb017d Merge branch 'serial_test_upgrade' into 'main'
Upgrade to serial_test 2.0.0

See merge request tpo/core/arti!1159
2023-04-28 16:57:44 +00:00
Nick Mathewson 56b99075f6 Upgrade to serial_test 2.0.0 2023-04-28 10:35:54 -06:00
Ian Jackson c0aa600179 RelayId: implement id_type and as_bytes in terms of RelayIdRef
This eliminates some duplicated code.
2023-04-27 20:39:03 +01:00
Ian Jackson 58a0803667 RelayIdRef: as_bytes: Doesn't borrow from self
This borrows from the contained key, but not from self.

This will allow us to implement RelayId::as_bytes in terms of
RelayIdRef::as_bytes.
2023-04-27 20:39:03 +01:00
Ian Jackson 4b03795915 RelayId: impl Display in terms of RelayIdRef
This removes a duplicated copy of the format strings.
2023-04-27 20:37:36 +01:00
gabi-250 f9358183e0 Merge branch 'key-mgmt-api-sketch' into 'main'
dev docs: Add key manager API sketch.

Closes #834

See merge request tpo/core/arti!1147
2023-04-25 18:22:50 +00:00
Gabriela Moldovan 17ff3a6f6a
dev docs: Add a few lines about handling concurrent access.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:25 +01:00
Gabriela Moldovan 5407e599ab
dev docs: Fill out insert/remove APIs.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:20 +01:00
Gabriela Moldovan 67061688a6
dev docs: Remove incoherent waffle.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:16 +01:00
Gabriela Moldovan a5ff3191e9
dev docs: Update KeyMgr implementation based on latest discussions.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:11 +01:00
Gabriela Moldovan 3202aa33c5
dev docs: Remove unnecessary trait bounds.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:05 +01:00
Gabriela Moldovan 6c6e03ec4a
dev docs: Remove outdated reference to the comment field.
We decided against using it.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:00 +01:00
Gabriela Moldovan 37493b6bd3
dev docs: Add namespacing for client/hs/relay/.. keys.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:56 +01:00
Gabriela Moldovan 0be6e0a4ca
dev docs: Remove KeyIdentityResult.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:47 +01:00
Gabriela Moldovan 9af07e91a2
dev docs: Remove HSM APIs.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:42 +01:00
Gabriela Moldovan 49ff17901b
dev docs: clarify what a "key identity" is.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:38 +01:00
Gabriela Moldovan 28bac87d96
dev docs: Allow multiple key stores to be in use at the same time.
The key manager needs to be flexible enough to support loading keys from
one of several key stores. This is because when we add support for smart
cards, users will want to be able to store some keys on the smart card,
and others in one of the disk key stores (for example).

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:31 +01:00
Gabriela Moldovan fb6d5dc0d9
dev docs: Add some impls for `LocalUserIdentity`.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:22 +01:00
Gabriela Moldovan dc616d9e07
dev docs: Add key manager API sketch.
This is the first draft of the key manager API.

I don't expect this to be the final version of the API, and I'm sure
there are plenty of improvements to be made. This is mostly a request
for comments.

Closes #834

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:05 +01:00
Gabriela Moldovan b967749325
netdoc: Document how to extract an `HsDesc` out of an `UncheckedEncryptedHsDesc`.
This adds an example to the `HsDesc::parse` docs. The constants from the
example are lifted from the `parse_desc_good` test.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:15:56 +01:00
Gabriela Moldovan 8f4e876924
netdoc: Add a convenience method for HS descriptor parsing.
This adds the `HsDesc::parse_decrypt_validate` method, which parses,
decrypts, and validates HS descriptors.

Closes #809

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:15:53 +01:00
Nick Mathewson 829122ba2d Merge branch 'memchr_upgrade' into 'main'
Bump our own memchr dependency to 2.5

See merge request tpo/core/arti!1151
2023-04-23 15:01:15 +00:00
Nick Mathewson dc187c8fb8 Bump our own memchr dependency to 2.5
This appears to be necessary for getting "minimal-versions" to be
happy with memchr dependencies between reges and async-compression.
2023-04-22 09:41:47 -04:00
Nick Mathewson 74e5c29951 Merge branch 'rpc_method_syntax' into 'main'
RPC: update method declaration syntax and implementation

Closes #835 and #821

See merge request tpo/core/arti!1148
2023-04-19 18:27:50 +00:00
Nick Mathewson 7c1f45a514 RPC: Log all internal errors. 2023-04-19 12:38:26 -04:00
Nick Mathewson ffcbd8fe88 rpc: Simplify and clarify SendUpdateError. 2023-04-19 12:38:26 -04:00
Nick Mathewson accd3d858f Arti: Add ability to remember the list of methods names.
Right now, this lets us say whether the method was unrecognized or
whether the parameter type was incorrect.

We'll use this to enforce correct method names later on.

(I have to add another `inventory` here, since the `typetag`
maintainer does not want to expose this functionality: see
https://github.com/dtolnay/typetag/issues/57#issuecomment-1506106290
)
2023-04-19 12:38:26 -04:00
Nick Mathewson e6092e99ea rpc: New syntax for method declaration
Now you just declare your function `my_func` with the right types,
and invoke `rpc_invoke_fn!{ my_func(ObjType, MethodType); }`
2023-04-19 12:38:26 -04:00
Nick Mathewson a415b0e2d2 rpc: impl From<SendUpdateError> for RpcError. 2023-04-19 12:38:26 -04:00
Nick Mathewson f33aefd76c rpcserver: Use with_fn. 2023-04-19 12:38:26 -04:00
Nick Mathewson 6f6a4d073e rpcbase: Use with_fn. 2023-04-19 12:38:26 -04:00
Nick Mathewson 8a8c800c99 async-utils: Add a SinkExt with a with_fn
(This function behaves as `futures::sink::SinkExt::with`, except
that the function that it takes does not return a future.)
2023-04-19 12:38:26 -04:00
Nick Mathewson d54154e520 async-utils: rename sinkext to prepare_send 2023-04-19 12:38:26 -04:00
Nick Mathewson 5cd5e6a3f8 async-utils: rename SinkExt to SinkPrepareExt 2023-04-19 12:38:26 -04:00
Nick Mathewson 80a13ff898 rpc: Minor tweaks to get a sink to compile. 2023-04-19 12:38:26 -04:00
Nick Mathewson 0503f7bd4b rpc: Use Method types to determine type of method outputs, updates.
This lets us do much less in our rpc_invoke_fn functions.
2023-04-19 12:38:26 -04:00
Nick Mathewson 7dcfb02c22 rpc: Split Method into DynMethod and Method
Now `Method` has an Output and Update associated type, and
`decl_method` can do a little more.
2023-04-19 12:38:26 -04:00