aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
AgeCommit message (Collapse)Author
2017-01-18Remove the (no longer compiled) code for legacy guard selection.Nick Mathewson
Part of 20830.
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Wrap all of the legacy guard code, and its users, in #ifdefsNick Mathewson
This will make it easier to see what we remove down the line.
2016-12-16Remove some resolved "XXXX prop271" comments.Nick Mathewson
2016-12-16Remove guard_selection argument from status-reporting functionsNick Mathewson
This prevents us from mixing up multiple guard_selections
2016-12-08Fix comment on connection_or_client_learned_peer_id().Nick Mathewson
2016-12-08Tiny cleanup of chan handling when setting connection ID digestsNick Mathewson
2016-12-08Use connection_or_clear_identity in connection_or_clear_identity_map.Nick Mathewson
2016-12-08Canonicity update for ed25519.Nick Mathewson
If a node can prove its Ed25519 identity, don't consider connections to it canonical unless they match both identities. Includes link handshake changes needed to avoid crashing with bug warnings, since the tests now reach more parts of the code. Closes ticket 20355
2016-12-08Teach channel_rsa_id_group_set_badness_() about Ed25519Nick Mathewson
(Only run the connection_or_group_set_badness_() function on groups of channels that have the same RSA and Ed25519 identities.) There's a possible opportunity here where we might want to set a channel to "bad" if it has no ed25519 identity and some other channel has some. Also there's an opportunity to add a warning if we ever have an Ed mismatch on open connections with the same RSA ID.
2016-12-08Enforce directionality in connection_or_set_identity_digest().Nick Mathewson
This function has never gotten testing for the case where an identity had been set, and then got set to something else. Rather than make it handle those cases, we forbid them.
2016-12-08Add a few more debug/info-level logs for ed25519 link handshake stuffNick Mathewson
2016-12-08Enforce Ed25519 identities (client-side)Nick Mathewson
This patch makes two absolutely critical changes: - If an ed25519 identity is not as expected when creating a channel, we call that channel unsuccessful and close it. - When a client creating a channel or an extend cell for a circuit, we only include the ed25519 identity if we believe that the node on the other side supports ed25519 link authentication (from #15055). Otherwise we will insist on nodes without the right link protocol authenticating themselves. - When deciding to extend to another relay, we only upgrade the extend to extend by ed25519 ID when we know the ed25519 ID _and_ we know that the other side can authenticate. This patch also tells directory servers, when probing nodes, to try to check their ed25519 identities too (if they can authenticate by ed25519 identity). Also, handle the case where we connect by RSA Id, and learn the ED25519 ID for the node in doing so.
2016-12-08Propagate Ed25519 identities downwards into more functions.Nick Mathewson
Actually set ed25519 identities on channels when we set a channel's identity.
2016-12-08Rename connection_or_remove_from_identity_mapNick Mathewson
2016-12-08Remove orconn_identity_map.Nick Mathewson
It is no longer needed; look up channels by identity instead.
2016-12-08Migrate main data loop for set_bad_connections to use channel structuresNick Mathewson
This was the last user of our or_connections-by-ID map. It also had a tendency to be O(N) in cases that only had to be O(1).
2016-12-08Add a bunch of work-in-progress comments for 15056 planningNick Mathewson
2016-12-08When attempting to find a channel by ID, consider Ed ID.Nick Mathewson
Right now, there's only a mechanism to look for a channel where the RSA ID matches *and* the ED ID matches. We can add a separate map later if we want.
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-30Split bridge functions into a new module.Nick Mathewson
This patch is just: * Code movement * Adding headers here and there as needed * Adding a bridges_free_all() with a call to it. It breaks compilation, since the bridge code needed to make exactly 2 calls into entrynodes.c internals. I'll fix those in the next commit.
2016-11-03whitespace fixesNick Mathewson
2016-11-03Merge branch 'feature_15055_v2'Nick Mathewson
2016-11-03Extract the common code in add_*_cert to a helper.Nick Mathewson
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-03Label a few conditions in link authentication code as bugs.Nick 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-03Refactor RSA certificate checking into its own function.Nick Mathewson
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.
2016-11-03Refactor ...compute_authenticate_cell_body() to return a var_cell_t.Nick Mathewson
This means we don't need to precompute the length. Helps simplify the implementation of 19156.
2016-11-03Code to send correct authentication data when we are using AUTHTYPE>2Nick Mathewson
Implements the major part of 19156, except doesn't actually send the new cell type yet.
2016-11-03New authentication types to use RFC5705.Nick Mathewson
See proposal 244. This feature lets us stop looking at the internals of SSL objects, *and* should let us port better to more SSL libraries, if they have RFC5705 support. Preparatory for #19156
2016-11-03Send ed25519 certificates in certs cell, when we have them.Nick Mathewson
Implements 19155 (send CERTS cells correctly for Ed25519) Also send RSA->Ed crosscert
2016-11-03Refactor connection_or_send_certs_cell() to use trunnelNick Mathewson
We no longer generate certs cells by pasting the certs together one by one. Instead we use trunnel to generate them. Preliminary work for 19155 (send CERTS cell with ed certs)
2016-10-18Document connection_or.c and connection.c at module levelNick Mathewson
2016-08-20Unit test for pick_oos_victims()Andrea Shepard
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-02Bufferevent removal: remove HAS_BUFFEREVENT macros and usageNick Mathewson
This is another way that we had bufferevents-only code marked.
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-14Remove bufferevents dead codeU+039b
Signed-off-by: U+039b <*@0x39b.fr>
2016-06-28Merge branch 'maint-0.2.8'Nick Mathewson
2016-06-28whitespace fixesNick Mathewson
2016-06-28Resolve bug18812 by logging fallback key changes at info levelteor (Tim Wilson-Brown)
2016-06-28Refactor connection_or_client_learned_peer_id for bug18812teor (Tim Wilson-Brown)
No behavioural change. Also clarify some comments.
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-04-07Merge branch 'bug14334_squashed'Nick Mathewson
2016-04-07Don't mark guards as unreachable if connection_connect() fails.George Kadianakis
2016-03-28Rename tor_dup_addr to tor_addr_to_str_dup.Nick Mathewson
Patch from icanhasaccount; closes 18462.