Nick Mathewson
a142fc29af
Use tor_malloc_zero(x), not tor_calloc(x,sizeof(char))
...
(Also, fixes a wide line.)
2014-11-02 12:08:51 -05:00
Nick Mathewson
bbd8d07167
Apply new calloc coccinelle patch
2014-11-02 11:56:02 -05:00
Nick Mathewson
ded33cb2c7
Use the | trick to save a comparison in our calloc check.
2014-11-02 11:54:42 -05:00
Nick Mathewson
0d8abf5365
Switch to a < comparison for our calloc check; explain how it works
2014-11-02 11:54:42 -05:00
Mansour Moufid
81b452d245
Document the calloc function overflow check.
2014-11-02 11:54:42 -05:00
Mansour Moufid
06b1ef7b76
Remove a duplicate comment.
2014-11-02 11:54:42 -05:00
Mansour Moufid
3206dbdce1
Refactor the tor_reallocarray_ overflow check.
2014-11-02 11:54:42 -05:00
Mansour Moufid
aff6fa0b59
Refactor the tor_calloc_ overflow check.
2014-11-02 11:54:41 -05:00
Nick Mathewson
efd5001c3b
Use digest256_len in networkstatus_copy_old_consensus_info()
...
Now, if a router ever changes its microdescriptor, but the new
microdescriptor SHA256 hash has the same 160-bit prefix as the old
one, we treat it as a new microdescriptor when deciding whether to
copy status information.
(This function also is used to compare SHA1 digests of router
descriptors, but don't worry: the descriptor_digest field either holds
a SHA256 hash, or a SHA1 hash padded with 0 bytes.)
2014-10-31 11:36:31 -04:00
Nick Mathewson
dc05b8549a
Use digest256map for computing microdescriptor downloads
2014-10-31 11:32:32 -04:00
Nick Mathewson
542b470164
Refactor {str,digest}map into a common implementation; add digest256map
...
Needed for #13399 .
2014-10-31 10:54:12 -04:00
Nick Mathewson
e20fc286c0
Re-run latest git trunnel to get fix from teor for #13577
2014-10-31 08:56:14 -04:00
Nick Mathewson
6f87aa3371
Merge commit '13298d90a90dc62d21d38f910171c9b57a8f0273'
2014-10-31 08:52:07 -04:00
Nick Mathewson
98ac48785b
Bump version to 0.2.6.1-alpha-dev
2014-10-30 10:25:24 -04:00
Nick Mathewson
d8ced3b473
Bump version to 0.2.6.1-alpha
2014-10-30 08:58:58 -04:00
teor
13298d90a9
Silence spurious clang warnings
...
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-30 22:34:46 +11:00
Nick Mathewson
fcdcb377a4
Add another year to our copyright dates.
...
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code. Right?
2014-10-28 15:30:16 -04:00
rl1987
14d59fdc10
Updating message that warns about running out of sockets we can use.
2014-10-28 14:13:25 -04:00
rl1987
f1ebe6bda4
Fix smartlist_choose_node_by_bandwidth() so that it rejects ORs with BadExit flag.
2014-10-28 14:07:08 -04:00
Nick Mathewson
2c884fd8cc
Merge remote-tracking branch 'rl1987/feature10427'
2014-10-28 14:03:40 -04:00
Nick Mathewson
0793ef862b
Merge remote-tracking branch 'sebastian/bug13286'
2014-10-27 12:12:16 -04:00
Sebastian Hahn
909aa51b3f
Remove configure option to disable curve25519
...
By now, support in the network is widespread and it's time to require
more modern crypto on all Tor instances, whether they're clients or
servers. By doing this early in 0.2.6, we can be sure that at some point
all clients will have reasonable support.
2014-10-27 14:41:19 +01:00
rl1987
36e771628e
Congratulate relay operator when OR is first started
...
When Tor first generates identity keypair, emit a log message that
thanks for their participation and points to new Tor relay lifecycle
document.
2014-10-26 21:53:48 +02:00
Nick Mathewson
f5fc7e3306
Fix a crash bug introduced in 223d354e3
.
...
Arma found this and commented on #11243 . Bug not in any released
version of Tor.
2014-10-26 14:09:03 -04:00
Nick Mathewson
9e2608b0d3
bump version to 0.2.5.10-dev
2014-10-24 09:22:58 -04:00
Nick Mathewson
ac4dd248e1
Switch new time tests to use SIZEOF_TIME_T, not sizeof(time_t)
...
Otherwise, we get implicit conversion warning on some platforms.
2014-10-22 12:57:21 -04:00
teor
c9d0967dd9
Fix minor typos, two line lengths, and a repeated include
2014-10-23 02:57:11 +11:00
Nick Mathewson
653221e807
Merge remote-tracking branch 'public/bug11824_v2'
2014-10-22 11:01:50 -04:00
Nick Mathewson
8e4daa7bb0
Merge remote-tracking branch 'public/ticket6938'
...
Conflicts:
src/tools/tor-resolve.c
2014-10-22 10:14:03 -04:00
Nick Mathewson
3826a88fc0
Merge remote-tracking branch 'teor/bug13476-improve-time-handling'
2014-10-21 13:14:27 -04:00
meejah
3d0d49be23
Additional test for error-case
...
This error-case was already fixed by previous changes,
this is to cover it in case there's a regression.
2014-10-21 00:14:57 -06:00
teor
a1c6a40c22
Conditionally compile time testing code based on integer size
2014-10-21 08:44:10 +11:00
Nick Mathewson
e3d166b7a6
Merge remote-tracking branch 'teor/memwipe-more-keys'
2014-10-20 11:12:51 -04:00
Nick Mathewson
3202ac6006
bump maint-0.2.5 to 0.2.5.9-rc-dev
2014-10-20 10:32:09 -04:00
Nick Mathewson
fed78bce8b
Whoops, bump the version properly.
2014-10-20 10:29:16 -04:00
Nick Mathewson
affa251c83
Use a macro to indicate "The ecdhe group we use by default".
...
This might make Coverity happier about the if statement where we
have a default case that's the same as one of the other cases. CID 1248515
2014-10-20 09:08:42 -04:00
Nick Mathewson
2d4c40ee5f
Fix a use-after-free error in cleaned-up rouerlist code.
...
Bug not in any released tor. This is CID 1248521
2014-10-20 09:04:53 -04:00
teor
2e1f5c1fc0
Memwipe more keys after tor has finished with them
...
Ensure we securely wipe keys from memory after
crypto_digest_get_digest and init_curve25519_keypair_from_file
have finished using them.
Fixes bug 13477.
2014-10-20 03:06:28 +11:00
teor
879b39e1a8
Further unit test tor_timegm and parse_rfc1123_time
...
Add unit tests for tor_timegm signed overflow,
tor_timegm and parse_rfc1123_time validity checks,
and correct_tm year clamping.
Unit tests (visible) fixes in bug 13476.
2014-10-20 02:52:21 +11:00
teor
d7b13543e2
Clamp (some) years supplied by the system to 1 CE
...
Clamp year values returned by system localtime(_r) and
gmtime(_r) to year 1. This ensures tor can read any
values it might write out.
Fixes bug 13476.
2014-10-20 02:47:31 +11:00
teor
238b8eaa60
Improve date validation in HTTP headers
...
Check all date/time values passed to tor_timegm
and parse_rfc1123_time for validity, taking leap
years into account.
Improves HTTP header validation.
Avoid unlikely signed integer overflow in tor_timegm
on systems with 32-bit time_t.
Fixes bug 13476.
2014-10-20 02:40:27 +11:00
teor
dd556fb1e6
Use correct day of year in correct_tm()
...
Set the correct day of year value in correct_tm() when the
system's localtime(_r) or gmtime(_r) functions fail to set struct tm.
Fixes bug 13476.
2014-10-20 02:32:05 +11:00
Nick Mathewson
fc5cab4472
Merge remote-tracking branch 'origin/maint-0.2.5'
2014-10-16 13:29:14 -04:00
Nick Mathewson
fb91d647ac
Downgrade 'invalid result from curve25519 handshake: 4' warning
...
Also, refactor the way we handle failed handshakes so that this
warning doesn't propagate itself to "onion_skin_client_handshake
failed" and "circuit_finish_handshake failed" and
"connection_edge_process_relay_cell (at origin) failed."
Resolves warning from 9635.
2014-10-16 13:26:42 -04:00
Nick Mathewson
ab4b29625d
Downgrade 'unexpected sendme cell from client' to PROTOCOL_WARN
...
Closes 8093.
2014-10-16 13:04:11 -04:00
Nick Mathewson
a5cc5ad08d
Merge remote-tracking branch 'yawning/bug13314'
2014-10-16 09:12:13 -04:00
Nick Mathewson
33b399a7b2
Merge remote-tracking branch 'origin/maint-0.2.5'
2014-10-16 09:09:20 -04:00
Nick Mathewson
22b9caf0ae
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2014-10-16 09:08:52 -04:00
Nick Mathewson
943fd4a252
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2014-10-16 09:08:32 -04:00
Nick Mathewson
c1c83eb376
Merge branch 'no_sslv3_023' into maint-0.2.3
2014-10-16 09:08:09 -04:00