aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-socksproto/src/handshake.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'error-socksproto-autoconvert' into 'main'Nick Mathewson2022-02-141-13/+6
|\ | | | | | | | | Provide, and use From impl for InternalError See merge request tpo/core/arti!315
| * Run rustfmt.Nick Mathewson2022-02-141-12/+5
| |
| * Provide, and use From impl for InternalErrorIan Jackson2022-02-141-7/+7
| | | | | | | | | | | | | | | | Adding this autoconversion is quite safe since every error generation site is explicit and has its own context, and we don't really need to add more. This simplifies the code and will simplify future work.
* | ErrorKind::NotImplemented: fix two testsIan Jackson2022-02-141-1/+1
| |
* | Split up ErrorKind::NoSupportIan Jackson2022-02-141-2/+2
|/
* socksproto: Simplify Truncated handlingNick Mathewson2022-02-111-1/+1
| | | | | | | | | | | | | Refactor the Error type to remove the yucky internal hidden Truncated variant. Instead, there's now an embedded tor_bytes::Error value. If that tor_bytes::Error is Truncated, we bubble it up when we convert our handshake result to the nested error struct. Thus there is still (sadly) a variant of tor_socksproto::Error that shouldn't be exposed to user code. But refactoring every inner method under handshake.rs seemed like a bad idea: once we're using Result<Result<..>>, the ? operator no longer helps us much.
* Move the Truncated error into tor-errors.Nick Mathewson2022-02-111-3/+3
|
* Try to resolve the "Truncated" error in tor-socksprotoNick Mathewson2022-02-111-24/+33
| | | | | I'm not in love with this solution; the others just seem a bit ugly too.
* tor-socksproto: Implement HasKindNick Mathewson2022-02-111-8/+25
| | | | | (This error isn't yet wrapped in TorError, but it will be eventually when we implement socks proxy and PT support.)
* Idle hacking to get tor-socksproto line coverage over 90%Nick Mathewson2021-12-021-1/+1
| | | | This was just a matter of adding a call to one function.
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-2/+3
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+563
This will cause some pain for now, but now is really the best time to do this kind of thing.