Ian Jackson
8948d611bd
Merge branch 'defer-hsservice-todos' into 'main'
...
Downgrade every "TODO HS" in tor-hsservice
See merge request tpo/core/arti!1265
2023-06-21 15:13:46 +00:00
Ian Jackson
1e5004eba7
Merge branch 'hsdesc-accessors' into 'main'
...
netdoc: Use derive amplify::Getters for HsDesc accessors.
Closes #909
See merge request tpo/core/arti!1266
2023-06-21 15:11:05 +00:00
Alexander Færøy
ddb81d7efd
Merge branch 'doc_link_fix' into 'main'
...
Fix a rustdoc link.
See merge request tpo/core/arti!1274
2023-06-21 15:04:54 +00:00
Gabriela Moldovan
f633e41380
keymgr: Remove Error::NotFound, update KeyMgr, KeyStore APIs.
...
This removes the `NotFound` `tor_keymgr::Error` variant. Since `KeyMgr`
and `KeyStore` users will need to be able to distinguish between "not
found" errors and other I/O errors, this also changes the return types
of the `get()` and `remove()` functions of `KeyStore` and `KeyMgr`,
which now return `Ok(None)` instead of `Error::NotFound`.
This makes the `KeyStore` API consistent with `KeyMgr::get`, which
already has a return type of `Result<Option<K>>` (rather than
`Result<K>`).
This also prepares us for #901 , which will make key store errors
opaque. Without this change:
* we'd have to create a `struct NotFoundError;` error type. Its
`HasKind` impl would need to return a new
`ErrorKind::KeyStoreErrorNotFound` `ErrorKind` variant
* callers would have to match the `error_kind()` of the error to
figure out whether the key simply can't be found
(`ErrorKind::KeyStoreErrorNotFound`), or if something went wrong
(any other `ErrorKind`).
Given the above, I think `Result<Option<()>>` makes for a more ergonomic
API.
Part of #901
2023-06-21 16:00:30 +01:00
gabi-250
53a05c1e7b
Merge branch 'upgrade_21June2023' into 'main'
...
Upgrade a couple of dependencies
See merge request tpo/core/arti!1276
2023-06-21 14:23:50 +00:00
Nick Mathewson
dd944bc787
Generate correct ErrorKinds for hsdesc decryption failures.
...
Part of #736
2023-06-21 10:22:42 -04:00
Gabriela Moldovan
523eb7e5f0
keymgr: Remove outdated TODO.
...
This TODO describes something we're not planning to implement, so let's
just remove it.
2023-06-21 14:55:13 +01:00
Gabriela Moldovan
521ba309cc
keymgr: Remove unnecessary condition.
...
We don't need to special-case `NotFound` errors because
`ssh_key::PrivateKey::from_openssh` doesn't read from disk (so it
shouldn't be returning `NotFound` errors in the first place).
Previously, this condition made sense because we were using
`ssh_key::PrivateKey::read_openssh_file` instead of
`ssh_key::PrivateKey::from_openssh`, which _does_ read from disk. This
condition should have been removed in !1263 (the refactoring where we
switched to `from_openssh`).
(Also, after #901 is implemented, we probably won't have an
`Error::NotFound` error anymore).
2023-06-21 14:42:42 +01:00
Nick Mathewson
a7627341ec
Merge branch 'onionsocks' into 'main'
...
arti: return prop304 extended socks5 reply codes for onion services
See merge request tpo/core/arti!1248
2023-06-21 13:38:42 +00:00
Nick Mathewson
4ab95a4d26
Merge branch 'chanmgr-method' into 'main'
...
Create chanmgr() method in TorClient
See merge request tpo/core/arti!1275
2023-06-21 13:38:21 +00:00
Nick Mathewson
16a07a8f63
Upgrade to memmap2 0.7
2023-06-21 09:13:55 -04:00
Nick Mathewson
0505579497
Upgrade to strum 0.25.
2023-06-21 09:12:36 -04:00
Saksham Mittal
056ca5c438
Remove extra 'this' in some methods
2023-06-21 18:40:18 +05:30
Saksham Mittal
341cf5c690
Create chanmgr() method in TorClient
2023-06-21 18:34:24 +05:30
Nick Mathewson
2d7756956e
Add and use ErrorKinds for remaining onion service errors
2023-06-21 09:01:02 -04:00
Nick Mathewson
36c4112600
arti: return prop304 extended socks5 reply codes for onion services
...
We don't yet return all of them; this commit adds some todo notes
about changes we may need to our ErrorKinds.
Part of #736
2023-06-21 09:01:01 -04:00
Nick Mathewson
fbb3d98fb3
arti: Abbreviate SocksStatus and ErrorKind imports and refactor.
2023-06-21 09:00:03 -04:00
Nick Mathewson
f14a87e4c8
Merge branch 'todos' into 'main'
...
tor-hsclient: Dispose of easy todos and remove many allows
See merge request tpo/core/arti!1272
2023-06-21 12:53:16 +00:00
Nick Mathewson
372a72e185
Fix a rustdoc link.
2023-06-21 08:45:25 -04:00
Nick Mathewson
21ff8e8060
Merge branch 'chanmgr-doc-fix' into 'main'
...
Remove message 'For now, only direct channels are supported' in tor-chanmgr docs
See merge request tpo/core/arti!1273
2023-06-21 12:35:46 +00:00
Nick Mathewson
107fbb05de
Merge branch 'geoip-nullity-fromstr' into 'main'
...
Followups wrt country-code robustness
See merge request tpo/core/arti!1268
2023-06-21 12:32:23 +00:00
Saksham Mittal
c3384df00f
Remove message 'For now, only direct channels are supported' in tor-chanmgr docs
2023-06-21 17:29:11 +05:30
Ian Jackson
9a05fbb10d
tor-hsclient: Apply deferred clippy churn needed by fmt churn
...
rustfmt *introduced* this clippy warning.
2023-06-21 12:54:57 +01:00
gabi-250
692049ed51
Merge branch 'openssl' into 'main'
...
Bump openssl because RUSTSEC-2023-0044
See merge request tpo/core/arti!1270
2023-06-21 11:24:58 +00:00
Ian Jackson
fe41d2059e
tor-hsclient: Apply deferred rustfmt churn
2023-06-21 12:19:04 +01:00
Ian Jackson
60fc4ef98a
tor-hsclient: Drop most allows that are marked for removal
2023-06-21 12:19:04 +01:00
Ian Jackson
a57d3067a5
tor-hsclient: Drop a large number of unneeded imports
2023-06-21 12:19:04 +01:00
Ian Jackson
ae1f144829
tor-hsclient: Add HSID to some log messages
...
For the debug!, we can use the unredacted form. For error!, we use
Sensitive.
2023-06-21 12:19:04 +01:00
Ian Jackson
d4b7714926
tor-hsclient: Do Debug the descriptor as part of Data
...
Empirically, this does not cause the descriptor to be spat out in
normal operation. And it seems right.
2023-06-21 12:19:04 +01:00
Ian Jackson
c94a726664
tor-hsclient: Drop some temporary trace calls
...
These were added as part of a debugging #885 , and are no longer
needed.
2023-06-21 12:19:04 +01:00
Ian Jackson
8267fb4535
tor-hsclient: Drop two eprintlns in production code
2023-06-21 12:19:04 +01:00
Ian Jackson
0845694021
tor-hsclinet: Promote dead code allows to cover all tests
...
We want to remove the crate-level dead code allows. The tests are
incomplete and there are multiple todos for that.
2023-06-21 12:19:04 +01:00
Ian Jackson
63ab6fb01c
tor-hsclient: Use a formulaic TODO mark for incompleteness of tests
2023-06-21 12:19:04 +01:00
Ian Jackson
5a7ea7067d
tor-hsclinet: Add a narrow allow, pending answer to open question
...
I need to talk to HS expert(s) about when this circuit can be
torn down.
2023-06-21 12:19:04 +01:00
Ian Jackson
9a30c4afce
tor-hsclient: Remove unused Context.hs_blind_id_key
2023-06-21 12:19:04 +01:00
Ian Jackson
8f90fe619e
tor-hsclient: Add an allow for a deliberately-unused variable
2023-06-21 12:19:04 +01:00
Ian Jackson
be3433891f
tor-hsclient: Omit some unussed struct fields in patterns
...
For the arms that have a fixed retry time, or a fixed ErrorKind,
dont't bind the unused inner error.
2023-06-21 12:19:04 +01:00
Ian Jackson
161b9844da
lints: Run maint/add_warning to actually apply new lints
2023-06-21 12:15:41 +01:00
Ian Jackson
802200e238
lints: Promote clippy::print_stderr and clippy::print_stdout
...
These are available in our MSRV now, so we don't need to handle
specially. We can just add them to the standard lint block.
(Lint block in every crate will be updated automatically in the next
commit.)
2023-06-21 12:14:10 +01:00
Ian Jackson
0c18de656f
Bump openssl because RUSTSEC-2023-0044
2023-06-21 11:57:34 +01:00
Nick Mathewson
8676b27e95
geoip: Add a few more tests.
2023-06-20 16:22:21 -04:00
Nick Mathewson
b0342a8ede
geoip: Explain in more detail what a CountryCode is to us.
2023-06-20 16:22:21 -04:00
Nick Mathewson
f918a86c10
geoip: require that ccs actually are printable ascii.
...
(There are plenty of strings that convert into 2 bytes of UTF8
without being two ascii characters, and there are plenty of
sequences of two ascii characters that aren't printable.)
2023-06-20 16:22:21 -04:00
Nick Mathewson
cf9d902320
geoip: Make ?? a little more bullet-proof
...
We want to make sure that ?? is always None, never a CountryCode.
2023-06-20 16:22:21 -04:00
gabi-250
db7f46265e
Merge branch 'keymgr-refactor-fs-ops' into 'main'
...
keymgr: Move FS operations out of KeyType impl
See merge request tpo/core/arti!1263
2023-06-20 18:41:33 +00:00
Nick Mathewson
f41b1178c5
netdoc: downgrade two accessor-related TODOs
2023-06-20 14:02:04 -04:00
Nick Mathewson
17fab6e913
netdoc: Use derive amplify::Getters for HsDesc accessors.
...
Closes #909 .
2023-06-20 14:00:41 -04:00
Nick Mathewson
8d4ca94e19
Merge branch 'add-tor-geoip' into 'main'
...
tor-geoip: Add new crate with GeoIP database functionality
See merge request tpo/core/arti!1239
2023-06-20 17:59:15 +00:00
Gabriela Moldovan
c40e064b42
keymgr: Fix clippy lints.
2023-06-20 18:54:35 +01:00
Gabriela Moldovan
97350cfe4b
keymgr: Address clippy lints and run cargo fmt.
2023-06-20 18:54:35 +01:00