aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
AgeCommit message (Collapse)Author
2016-10-18Module docs for channel.c and channeltls.cNick Mathewson
2016-09-06checkSpace.pl now forbids more identifiers.Nick Mathewson
The functions it warns about are: assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc, strdup, strndup, calloc. Also, fix a few lingering instances of these in the code. Use other conventions to indicate _intended_ use of assert and malloc/realloc/etc.
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-02Search for remaining references to 'bufferevent'.Nick Mathewson
Remove or adjust as appropriate.
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-06-11Resolve some warnings from OSX clang.Nick Mathewson
2016-06-11Use -Wdouble-promotion in GCC >= 4.6Nick Mathewson
This warning triggers on silently promoting a float to a double. In our code, it's just a sign that somebody used a float by mistake, since we always prefer double.
2016-06-11Enable -Wnull-dereference (GCC >=6.1), and fix the easy casesNick Mathewson
This warning, IIUC, means that the compiler doesn't like it when it sees a NULL check _after_ we've already dereferenced the variable. In such cases, it considers itself free to eliminate the NULL check. There are a couple of tricky cases: One was the case related to the fact that tor_addr_to_in6() can return NULL if it gets a non-AF_INET6 address. The fix was to create a variant which asserts on the address type, and never returns NULL.
2016-03-28Rename tor_dup_addr to tor_addr_to_str_dup.Nick Mathewson
Patch from icanhasaccount; closes 18462.
2016-03-21Merge branch 'bug18570_027'Nick Mathewson
2016-03-21Make sure channel_t queues its own copy of incoming cellsAndrea Shepard
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2016-02-10Whitespace fixesNick Mathewson
2016-02-10Rename crypto_digest_all, and digests_t.Nick Mathewson
They are no longer "all" digests, but only the "common" digests. Part of 17795. This is an automated patch I made with a couple of perl one-liners: perl -i -pe 's/crypto_digest_all/crypto_common_digests/g;' src/*/*.[ch] perl -i -pe 's/\bdigests_t\b/common_digests_t/g;' src/*/*.[ch]
2015-12-10Refactor clock skew warning code to avoid duplicationArlo Breault
2015-06-01Appease make check-spacesAndrea Shepard
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28Refactor link handshake cell type implementations to use trunnelNick Mathewson
Unit tests still pass.
2015-05-28Tests for AUTHENTICATE cell functionality.Nick Mathewson
2015-05-28Start testing cell encoders/processers for the v3 handshake.Nick Mathewson
An earlier version of these tests was broken; now they're a nicer, more robust, more black-box set of tests. The key is to have each test check a handshake message that is wrong in _one_ way.
2015-03-10Add link protocol version counts to the heartbeat messageNick Mathewson
Closes ticket 15212
2015-02-24Mechanical rename: tor_cert_t -> tor_x509_cert_tNick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-21Merge branch 'ticket7356_squashed'Nick Mathewson
2014-12-21Fixing mistake in comment.rl1987
2014-12-21Using channel state lookup macros in channeltls.crl1987
2014-11-27Fix a 64-bit clang warningNick Mathewson
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-10-30Silence spurious clang warningsteor
Silence clang warnings under --enable-expensive-hardening, including: + implicit truncation of 64 bit values to 32 bit; + const char assignment to self; + tautological compare; and + additional parentheses around equality tests. (gcc uses these to silence assignment, so clang warns when they're present in an equality test. But we need to use extra parentheses in macros to isolate them from other code).
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-30Track total queue size per channel, with overhead estimates, and global ↵Andrea Shepard
queue total
2014-09-30Remove no-longer-used channel_tls_t functionsAndrea Shepard
2014-09-30Provide generic mechanism for scheduler to query writeable cells on a channelAndrea Shepard
2014-09-30Implement scheduler mechanism to track lists of channels wanting cells or ↵Andrea Shepard
writes; doesn't actually drive the cell flow from it yet
2014-09-05Correctly update channel local mark when address of incoming connection ↵Andrea Shepard
changes after handshake; fixes bug #12160
2014-06-11Merge remote-tracking branch 'public/ticket6799_024_v2_squashed'Nick Mathewson
Conflicts: src/or/channel.c src/or/circuitlist.c src/or/connection.c Conflicts involved removal of next_circ_id and addition of unusable-circid tracking.
2014-06-11Give each or_connection_t a slightly randomized idle_timeoutNick Mathewson
Instead of killing an or_connection_t that has had no circuits for the last 3 minutes, give every or_connection_t a randomized timeout, so that an observer can't so easily infer from the connection close time the time at which its last circuit closed. Also, increase the base timeout for canonical connections from 3 minutes to 15 minutes. Fix for ticket 6799.
2014-04-07Merge remote-tracking branch 'public/bug10363_024_squashed'Nick Mathewson
2014-04-07Fix undefined behavior with pointer addition in channeltls.cNick Mathewson
In C, it's a bad idea to do this: char *cp = array; char *end = array + array_len; /* .... */ if (cp + 3 >= end) { /* out of bounds */ } because cp+3 might be more than one off the end of the array, and you are only allowed to construct pointers to the array elements, and to an element one past the end. Instead you have to say if (cp - array + 3 >= array_len) { /* ... */ } or something like that. This patch fixes two of these: one in process_versions_cell introduced in 0.2.0.10-alpha, and one in process_certs_cell introduced in 0.2.3.6-alpha. These are both tracked under bug 10363. "bobnomnom" found and reported both. See also 10313. In our code, this is likely to be a problem as we used it only if we get a nasty allocator that makes allocations end close to (void*)-1. But it's best not to have to worry about such things at all, so let's just fix all of these we can find.
2014-02-09Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2014-02-08Make sure orconn->chan gets nulled out when channels exit from ↵Andrea Shepard
channel_free_all() too
2014-02-07Remove a needless check in channel_tls_handle_incomingNick Mathewson
This patch removes an "if (chan)" that occurred at a place where chan was definitely non-NULL. Having it there made some static analysis tools conclude that we were up to shenanigans. This resolves #9979.
2014-02-07Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2014-02-06NULL out conns on tlschans when freeing in case channel_run_cleanup() is ↵Andrea Shepard
late; fixes bug 9602
2014-02-0310365: Close connections if the VERSIONS cell has an odd length.rl1987
Fixes issue 10365.
2013-12-09Merge remote-tracking branch 'public/bug10131_024'Nick Mathewson
2013-12-09Remove a check in channeltls.c that could never fail.Nick Mathewson
We were checking whether a 8-bit length field had overflowed a 503-byte buffer. Unless somebody has found a way to store "504" in a single byte, it seems unlikely. Fix for 10313 and 9980. Based on a pach by Jared L Wong. First found by David Fifield with STACK.
2013-08-25Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson