Commit Graph

7796 Commits

Author SHA1 Message Date
Nick Mathewson fb005dc744 client-demo: do a TLS handshake. 2020-09-09 11:05:58 -04:00
Nick Mathewson 1f5d758dc3 netdir: look in right path for cached-microdescs.new 2020-09-09 10:55:34 -04:00
Nick Mathewson 875e932898 New "linkspec" module to encapsulate info needed to connect/extend. 2020-09-08 20:43:15 -04:00
Nick Mathewson 0fc85598d1 rename weightfn variants 2020-09-08 19:57:12 -04:00
Nick Mathewson 48b9510caa Add a handy function for picking a random relay. 2020-09-08 17:50:08 -04:00
Nick Mathewson 8768222acb Start on accessors for relay weight. 2020-09-08 17:20:46 -04:00
Nick Mathewson fc5a1b7908 add emacs tmpfiles to gitignore 2020-09-08 16:53:20 -04:00
Nick Mathewson 60698cc6d5 Create a stub for a minimal demo client program.
For now, it's set up to just use a chutney network, so I don't
cause major drama with the real network.

I'll be working on this in parallel with proto and netdir
improvements, until it works.
2020-09-08 16:37:16 -04:00
Nick Mathewson e40a63c013 netdir: add the ability to add authorities from a chutney directory. 2020-09-08 14:34:43 -04:00
Nick Mathewson 92830810d5 netdir: Add an extra day's tolerance to consensus timeouts 2020-09-08 14:05:22 -04:00
Nick Mathewson d840bbbf64 TimerangeBound: add functions to extend the tolerances
(This seems much cleaner than baking extra tolerances into the
"true" validity intervals")
2020-09-08 14:01:26 -04:00
Nick Mathewson 8ef0098716 Refactor timerangebound to unwrap bounds earlier.
This will make them easier to adjust
2020-09-08 13:54:01 -04:00
Nick Mathewson e31652afe1 Bugfix: parse ed25519 ids right in mds 2020-09-08 13:30:16 -04:00
Nick Mathewson b5ad25e0d4 Netdir: a few more accessors 2020-09-08 12:56:45 -04:00
Nick Mathewson 17217a7dfa netdoc: add a few accessors 2020-09-07 18:07:34 -04:00
Nick Mathewson a4f1b27334 Fix clippy warnings; improve key type for consensus. 2020-09-07 17:27:29 -04:00
Nick Mathewson 3df3198363 RSAIdentity: Better Display and Debug. 2020-09-07 17:15:03 -04:00
Nick Mathewson b6a3642903 netdoc: ignore bad entries in families.
Some of these are nicknames, which we can safely ignore.
2020-09-07 16:57:57 -04:00
Nick Mathewson 919a7c5970 Start on a 'netdir' crate to wrap netdoc.
For now, this assumes an existing Tor cache directory.
2020-09-07 16:53:06 -04:00
Nick Mathewson 541b6fa55f relaycell: slight error cleanup 2020-09-07 12:25:41 -04:00
Nick Mathewson 6456653941 relaycell: move cmd into Unrecognized. 2020-09-07 12:19:19 -04:00
Nick Mathewson 010d93f453 proto::relaycell: documentation and light refactoring 2020-09-07 12:14:23 -04:00
Nick Mathewson b91f6b2cbd rename relaycell stuff to its own module; rename a bit 2020-09-06 22:01:15 -04:00
Nick Mathewson 4266aa7d12 proto: Finish documenting chancell 2020-09-06 21:49:30 -04:00
Nick Mathewson 7095192063 proto: small err cleanups 2020-09-06 17:50:06 -04:00
Nick Mathewson b54a960f3d proto: make write_body_onto destructive. That might help down the road 2020-09-06 17:20:02 -04:00
Nick Mathewson ae1c813a70 Reinstate ChanCell as a meaningful type. 2020-09-06 17:15:07 -04:00
Nick Mathewson e749e2bc27 proto: major refactor to channel cells
The protocol is now based around a message-oriented scheme intended
to use futures_codec, which in turn uses BytesMut.  The transition
to BytesMut is incomplete, and we're not nearly so zero-copy as
intended.  We should think about that.
2020-09-06 16:00:14 -04:00
Nick Mathewson 8db525dab4 tor-bytes: Add initial support for the bytes crate 2020-09-05 10:07:23 -04:00
Nick Mathewson b679ab216c Make MDConsensus also follow the checkable pattern. 2020-09-03 16:06:45 -04:00
Nick Mathewson fbb35dc72a Port authcert to use tor_checkable. 2020-09-03 15:02:36 -04:00
Nick Mathewson b3358673b5 Migrate certificate and routerdesc checking to tor-checkable
Now these types are parsed and returned wrapped inside a checkable
object.
2020-09-03 14:45:46 -04:00
Nick Mathewson 63adba1744 checkable: Add a simple type for self-signed objects. 2020-09-03 11:13:07 -04:00
Nick Mathewson 4ec97aa613 llcrypto: Define a "ValidatableSignature" type
This type wraps a signature, a public key, and the signed object.
It's meant to be useful for implementing SelfSigned objects.
2020-09-03 10:34:40 -04:00
Nick Mathewson 481e5e5a63 New module with traits for time-bound and signed objects
Too often I've been writing code that defers timeliness checking to
an is_valid_at() method [which you'd better call or else whoops] and
which does signature checking while parsing [not great for
performance].

Instead, let's make return types where you can't get at the interior
object without first either checking the signatures/timeliness, or
declaring that (dangerously) you don't care.
2020-09-01 17:59:58 -04:00
Nick Mathewson c8602beba9 WANT_FROM_OTHER_CRATES: observations on tls 2020-09-01 15:27:05 -04:00
Nick Mathewson 790d6becf2 Implement an ersatz hash() for RSAIdentity
For whatever reason, something I had didn't like me implementing a
custom PartialEq but deriving Hash
2020-08-28 18:16:56 -04:00
Nick Mathewson 4b75c51882 Run cargo-upgrade. 2020-08-28 18:14:17 -04:00
Nick Mathewson f55f86c6a8 llcrypto: add test vectors for sha3 and shake 2020-08-28 17:47:16 -04:00
Nick Mathewson 4a2e732457 Small readme edit 2020-08-28 13:42:08 -04:00
Nick Mathewson 6fabb54033 netdoc: Parser for microdesc consensus documents
There's more to do here, and things to refactor, but this ought to
be enough to get a rudimentary client working.
2020-08-27 14:30:24 -04:00
Nick Mathewson e221146d9e llcrypto: make RSAIdentity implement the Hash trait. 2020-08-27 12:54:07 -04:00
Nick Mathewson 86f6f30b6d netdoc: parse multiple authcerts from a string. 2020-08-27 12:54:07 -04:00
Nick Mathewson 696e7ad334 netdoc: add a check_len method for B64 2020-08-26 10:57:07 -04:00
Nick Mathewson d4af6a163f Add a B16 argument type, to mirror B64. 2020-07-20 20:55:47 -04:00
Nick Mathewson bbb8fea39b More parsing for fingerprints, including non-spaced fingerprints. 2020-07-20 20:55:47 -04:00
Nick Mathewson 5f00e41a6b Expose Protocols::new() as public. 2020-07-20 20:55:47 -04:00
Nick Mathewson 8c0bbfef2c tor-netdoc: Make SectionRules derive Clone.
This is going to come in handy for the networkstatus stuff, where I
need to define different variants of SectionRules for votes and
consensuses.
2020-07-20 20:55:47 -04:00
Nick Mathewson 173bec26a5 Update to latest packages; ed25519 now needs signature crate traits. 2020-07-20 20:55:03 -04:00
Nick Mathewson 7bd7e7ec7d Run cargo fix --edition-idioms 2020-06-26 13:17:14 -04:00