aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2016-10-14Merge remote-tracking branch 'public/spaces_in_unix_addrs'Nick Mathewson
2016-10-11Switch from "AF_UNIX is always equal" to "always unequal" to avoid wacky ↵Nick Mathewson
bugs. See discussion on 20261
2016-10-11Merge remote-tracking branch 'yawning-schwanenlied/bug20261'Nick Mathewson
2016-10-11torrc parsing b0rks on carriage-returnpaolo.ingls@gmail.com
(Specifically, carriage return after a quoted value in a config line. Fixes bug 19167; bugfix on 0.2.0.16-alpha when we introduced support for quoted values. Unit tests, changes file, and this parenthetical by nickm.)
2016-10-10Bug 20261: Treat AF_UNIX addresses as equal when comparing them.Yawning Angel
This is a kludge to deal with the fact that `tor_addr_t` doesn't contain `sun_path`. This currently ONLY happens when circuit isolation is being checked, for an isolation mode that is force disabled anyway, so the kludge is "ugly but adequate", but realistically, making `tor_addr_t` and the AF_UNIX SocksPort code do the right thing is probably the better option.
2016-10-06Stop implying that we support openssl 1.0.0; we don't.Nick Mathewson
Closes ticket 20303. The LIBRESSL_VERSION_NUMBER check is needed because if our openssl is really libressl, it will have an openssl version number we can't really believe.
2016-10-04Allow a unix: address to contain a C-style quoted string.Nick Mathewson
Feature 18753 -- all this to allow spaces.
2016-10-03Avoid reordering IPv6 interface addressescypherpunks
When deleting unsuitable addresses in get_interface_address6_list(), to avoid reordering IPv6 interface addresses and keep the order returned by the OS, use SMARTLIST_DEL_CURRENT_KEEPORDER() instead of SMARTLIST_DEL_CURRENT(). This issue was reported by René Mayrhofer. [Closes ticket 20163; changes file written by teor. This paragraph added by nickm]
2016-09-24Merge branch 'osx_sierra_028'Nick Mathewson
2016-09-24Fix pthread_cond_timedwait() on OSX SierraNick Mathewson
Sierra provides clock_gettime(), but not pthread_condattr_setclock. So we had better lot try to use CLOCK_MONOTONIC as our source for time when waiting, since we ccan never actually tell the condition that we mean CLOCK_MONOTONIC. This isn't a tor bug yet, since we never actually pass a timeout to tor_cond_wait() outside of the unit tests.
2016-09-24Fix compilation on OSX Sierra (10.12)Nick Mathewson
2016-09-22Fix conflicting types errors for aes.c.Nick Mathewson
2016-09-16Add support for AES256 and AES192Nick Mathewson
(This will be used by prop224)
2016-09-16Remove a needless level of indirection from crypto_cipher_tNick Mathewson
Now that crypto_cipher_t only contains a pointer, it no longer has any reason for an independent existence.
2016-09-16Simplify the crypto_cipher_t interface and structureNick Mathewson
Previously, the IV and key were stored in the structure, even though they mostly weren't needed. The only purpose they had was to support a seldom-used API where you could pass NULL when creating a cipher in order to get a random key/IV, and then pull that key/IV back out. This saves 32 bytes per AES instance, and makes it easier to support different key lengths.
2016-09-16In aes.c, support 192-bit and 256-bit keys.Nick Mathewson
Also, change the input types for aes_new_cipher to be unsigned, as they should have been all along.
2016-09-14Remove an extraneous parenthesis in IF_BUG_OHNCE__Nick Mathewson
Fixes bug 20141; bugfix on 0.2.9.1-alpha. Patch from Gisle Vanem.
2016-09-13Merge remote-tracking branch 'public/bug20063'Nick Mathewson
2016-09-13Merge remote-tracking branch 'public/ticket19998'Nick Mathewson
2016-09-11Merge remote-tracking branch 'public/solaris_warnings_028'Nick Mathewson
2016-09-09Fix cases where the tests were doing closesocket() on a non-socketNick Mathewson
These seem to have caused warnings on windows. Hmmm.
2016-09-09Chop another ~93 RSA key generations out of the unit testsNick Mathewson
We have a mock for our RSA key generation function, so we now wire it to pk_generate(). This covers all the cases that were not using pk_generate() before -- all ~93 of them.
2016-09-08Treat all nonfatal assertion failures as unit test failures.Nick Mathewson
Part of 19999.
2016-09-06Add facility to suppress/capture tor_bug_occurred_() messages in unit tests.Nick Mathewson
2016-09-06Add !(...) to BUG() log messagesNick Mathewson
They use the same code as reporting assertion failures, so we should invert the sense of what we're "asserting". Fixes bug 20093.
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-09-06Fix a comment typo in smartlist_get_most_frequent_()teor (Tim Wilson-Brown)
2016-09-05For me, asan/ubsan require more syscalls.Nick Mathewson
Permit sched_yield() and sigaltstack() in the sandbox. Closes ticket 20063
2016-09-05Change servers to never pick 3DES.Nick Mathewson
Closes ticket 19998.
2016-08-31It is not a bug to attempt to base32_decode a non-base32 stringNick Mathewson
(Rationale: it isn't a bug to try this for a base16 or base64 string. It's just a bad input that we're detecting.)
2016-08-31Do not call tor_tls_server_info_callback(NULL) from tests.Nick Mathewson
This isn't valid behavior, and it causes a crash when you run the unit tests at --debug. I've added an IF_BUG_ONCE() check for this case.
2016-08-31setup_capture_of_logs: no longer suppress log messagesNick Mathewson
Previously setup_capture_of_logs would prevent log messages from going to the console entirely. That's a problem, since sometimes log messages are bugs! Now setup_capture_of_logs() acts sensibly. If you really do need to keep a message from going to the console entirely, there is setup_full_capture_of_logs(). But only use that if you're prepared to make sure that there are no extraneous messages generated at all.
2016-08-23Fix some comments in sandbox.cNick Mathewson
Closes ticket 19942; patch from "cypherpunks"
2016-08-23Merge remote-tracking branch 'asn/bug19872_v2'Nick Mathewson
2016-08-23Introduce ed25519_{sign,checksig}_prefixed functions().George Kadianakis
2016-08-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-19Avoid confusing GCC 4.2.1 by saying "int foo()... inline int foo() {...}"Nick Mathewson
Fixes bug 19903; bugfix on 0.2.8.1-alpha.
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-12Fix integer overflows in the conversion tablescypherpunks
2016-08-11Only use evutil_secure_rng_add_bytes() when present.Nick Mathewson
OpenBSD removes this function, and now that Tor requires Libevent 2, we should also support the OpenBSD Libevent 2. Fixes bug 19904; bugfix on 0.2.5.4-alpha.
2016-08-11Fix a bug in the old-gcc version of ENABLE_GCC_WARNINGNick Mathewson
Fixes bug 19901; bugfix on 0.2.9.1-alpha.
2016-08-02Search for remaining references to 'bufferevent'.Nick Mathewson
Remove or adjust as appropriate.
2016-08-02Bufferevent removal: remove more bufferevent-only optionsNick Mathewson
(All this IOCP stuff was bufferevent-only.)
2016-08-02Remove USE_BUFFEREVENTS code outside src/orNick Mathewson
2016-07-29Keep make check-spaces happyAndrea Shepard
2016-07-28Three more -Wshadow fixes.Nick Mathewson
2016-07-28Fix a large pile of solaris warnings for bug 19767.Nick Mathewson
In nearly all cases, this is a matter of making sure that we include orconfig.h before we include any standard c headers.
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Merge branch 'bug18902_squashed'Nick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.