summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2016-11-04Fix compilation.Nick Mathewson
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04Use a better salted-MAC construction in build_mac()Nick Mathewson
2016-11-04prop224: Add a cache free all functionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04prop224: Use a const pointer for the cache lookup entryDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04prop224: Rename cert type to follow naming conventionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04Add EnableOnionServicesV3 consensus parameterDavid Goulet
This parameter controls if onion services version 3 (first version of prop224) is enabled or not. If disabled, the tor daemon will not support the protocol for all components such as relay, directory, service and client. If the parameter is not found, it's enabled by default. Closes #19899 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04Make check-spaces happy :)George Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 directory fetch/upload unit testsGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor fetchGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor publishingDavid Goulet
Closes #19205 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 directory cache unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory cache supportDavid Goulet
This implements the proposal 224 directory descriptor cache store and lookup functionalities. Furthermore, it merges the OOM call for the HSDir cache with current protocol v2 and the new upcoming v3. Add hs_cache.{c|h} with store/lookup API. Closes #18572 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 descriptor unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Descriptor decoding implementationDavid Goulet
Closes #18571 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Descriptor encoding implementationDavid Goulet
Add hs_descriptor.{c|h} with the needed ABI to represent a descriptor and needed component. Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Add new cert type for hidden serviceDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04Move token parsing code to parsecommon.{c|h}David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04hs: Refactor rend_data_t for multi version supportDavid Goulet
In order to implement proposal 224, we need the data structure rend_data_t to be able to accomodate versionning that is the current version of hidden service (2) and the new version (3) and future version. For that, we implement a series of accessors and a downcast function to get the v2 data structure. rend_data_t becomes a top level generic place holder. The entire rend_data_t API has been moved to hs_common.{c|h} in order to seperate code that is shared from between HS versions and unshared code (in rendcommon.c). Closes #19024 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-03Split a wide lineNick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20526_030_01'Nick Mathewson
2016-11-03Replace some assert(1)s with nonfatal_unreached_once().Nick Mathewson
These were probably supposed to be assert(0).
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Add assertion that cpath_layer==NULL on OR circNick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20376_030_01'Nick Mathewson
2016-11-03fix wide linesNick Mathewson
2016-11-03Merge branch 'bug20527_030_01_squashed'Nick Mathewson
2016-11-03hs: Escape service directories before printing themIvan Markin
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-03whitespace fixesNick Mathewson
2016-11-03Merge branch 'feature_15055_v2'Nick Mathewson
2016-11-03Audit use of tor_tls_cert_get_key().Nick Mathewson
This function is allowed to return NULL if the certified key isn't RSA. But in a couple of places we were treating this as a bug or internal error, and in one other place we weren't checking for it at all! Caught by Isis during code review for #15055. The serious bug was only on the 15055 branch, thank goodness.
2016-11-03Extract the common code in add_*_cert to a helper.Nick Mathewson
2016-11-03Mark some functions as needing documentation in src/or/routerkeys.c.Isis Lovecruft
2016-11-03Document two additional functions in src/or/routerkeys.c.Isis Lovecruft
Adds docstrings for generate_ed_link_cert() and should_make_new_ed_keys().
2016-11-03Drop support for AUTHTYPE_RSA_SHA256_RFC5705 authentication.Nick Mathewson
This was a stopgap method, designed on the theory that some routers might support it before they could support Ed25519. But it looks like everybody who supports RFC5705 will also have an Ed25519 key, so there's not a lot of reason to have this even supported.
2016-11-03Clean up comments, mark more branches as BUG.Nick Mathewson
2016-11-03Unit tests for cert-chain-processing, including failed casesNick Mathewson
Check out the coverage!
2016-11-03Label a few conditions in link authentication code as bugs.Nick Mathewson
2016-11-03For testing: function to construct (but not save) Ed keys and certsNick Mathewson
2016-11-03Send and receive AUTHENTICATE cells correctly with ED keys.Nick Mathewson
Includes updated test for authchallenge cells
2016-11-03Verify ed25519 link handshake certificatesNick Mathewson
This code stores the ed certs as appropriate, and tries to check them. The Ed25519 result is not yet used, and (because of its behavior) this will break RSA authenticate cells. That will get fixed as we go, however. This should implement 19157, but it needs tests, and it needs to get wired in.
2016-11-03Add "Ed ID" arguments to a bunch of connection-ID-related fns.Nick Mathewson
In particular, these functions are the ones that set the identity of a given connection or channel, and/or confirm that we have learned said IDs. There's a lot of stub code here: we don't actually need to use the new keys till we start looking up connections/channels by Ed25519 IDs. Still, we want to start passing the Ed25519 IDs in now, so it makes sense to add these stubs as part of 15055.
2016-11-03Handle u32 overflow in ed25519 cert expiration time.Nick Mathewson
The impact here isn't too bad. First, the only affected certs that expire after 32-bit signed time overflows in Y2038. Second, it could only make it seem that a non-expired cert is expired: it could never make it seem that an expired cert was still live. Fixes bug 20027; bugfix on 0.2.7.2-alpha.
2016-11-03Fix a misfeature with the Ed cert expiration APINick Mathewson
The batch-verification helper didn't expose the expiration time, which made it pretty error-prone. This closes ticket 15087.
2016-11-03Make the current time an argument to x509 cert-checking functionsNick Mathewson
This makes the code a bit cleaner by having more of the functions be pure functions that don't depend on the current time.
2016-11-03Add function to check RSA->Ed cross-certificationsNick Mathewson
Also, adjust signing approach to more closely match the signing scheme in the proposal. (The format doesn't quite match the format in the proposal, since RSA signatures aren't fixed-length.) Closes 19020.
2016-11-03Refactor RSA certificate checking into its own function.Nick Mathewson
2016-11-03Free rsa_ed_crosscert at exit.Nick Mathewson
Fixes bug 17779; bugfix on 0.2.7.2-alpha.
2016-11-03Migrate certificates into a sub-structure of or_handshake_stateNick Mathewson
This will help us do cert-checking in the background in the future, perhaps.