summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2012-04-03tor_vsscanf(): Don't return -1 if '%%' doesn't match.George Kadianakis
tor_vsscanf() is supposed to return the current number of matches on match failure.
2012-03-30Have tor_parse_*long functions check for negative basesNick Mathewson
One of our unit tests checks that they behave correctly (giving an error) when the base is negative. But there isn't a guarantee that strtol and friends actually handle negative bases correctly. Found by Coverity Scan; fix for CID 504.
2012-03-30Remove a couple redundant NULL-checks before crypto_cipher_freeNick Mathewson
Calling crypto_cipher_free(NULL) is always safe, since (by convention) all of our xyz_free() functions treat xyz_free(NULL) as a no-op. Flagged by coverity scan; fixes CID 508 and 509.
2012-03-28Make relays handle an address suggestion from a directory server giving an ↵Linus Nordberg
IPv6 address. last_guessed_ip becomes a tor_addr_t. Most parts of router_new_address_suggestion() learns about IPv6 (resolve_my_address() is still IPv4 only).
2012-03-27Excise PK_NO_PADDING entirely: Unpadded RSA is silly.Nick Mathewson
We never use it, so having it around is pointless. Suggested by Sebastian
2012-03-27Use OpenSSL 1.0.1's EVP aes_ctr implementation when availableNick Mathewson
This should be really fast on Intel chips.
2012-03-27Refactor the API for setting up a block cipher.Nick Mathewson
It allows us more flexibility on the backend if the user needs to specify the key and IV at setup time.
2012-03-27Remove support for PK_NO_PADDING in crypto_pk_public_hybrid_encryptNick Mathewson
We never use it, and it would be a stupid thing if we started using it.
2012-03-27Log statement to help track down bug4091Nick Mathewson
2012-03-12Close fds on pipe() error in tor_spawn_background().George Kadianakis
2012-03-09Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-03-09Correctly handle broken escape sequences in torrc valuesNick Mathewson
Previously, malformatted torrc values could crash us. Patch by Esteban Manchado. Fixes bug 5090; fix on 0.2.0.16-alpha.
2012-03-08Small fix in tor_sscanf documentationEsteban Manchado Velázquez
2012-03-08Fix typo in config parser documentationEsteban Manchado Velázquez
2012-03-08Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-03-08Fix compile warnings in openbsd mallocSebastian Hahn
2012-02-29Don't leak the env_vars_sorted smartlist in process_environment_makeNick Mathewson
Found by Coverity. No changes/ file, because this bug has not been in a release yet.
2012-02-20Merge remote-tracking branch 'sebastian/bug5161'Nick Mathewson
2012-02-20Fix crypto_hmac_sha256 documentation commentRobert Ransom
2012-02-19Don't redeclare environ if std headers already didSebastian Hahn
This would cause a redundant redeclaration warning on some versions of Linux otherwise.
2012-02-17Use get_environment(), not environ.Nick Mathewson
2012-02-17Merge branch 'bug5105-v2-squashed'Nick Mathewson
Conflicts: src/or/transports.c
2012-02-17Heap-allocate strings returned by get_current_process_environment_variablesRobert Ransom
2012-02-17Pass process_environment_t * to tor_spawn_backgroundRobert Ransom
Now tor_spawn_background's prototype is OS-independent.
2012-02-17Remove (void)envp from tor_spawn_backgroundRobert Ransom
The envp argument is used on Windows.
2012-02-17Change type of unixoid_environment_block to match tor_spawn_background's argRobert Ransom
2012-02-17Add set_environment_variable_in_smartlistRobert Ransom
2012-02-17Add get_current_process_environment_variablesRobert Ransom
2012-02-17Add process_environment_make and related utilitiesRobert Ransom
2012-02-17Add tor_callocRobert Ransom
2012-02-14Use _NSGetEnviron() instead of environ where requiredSebastian Hahn
OS X would otherwise crash with a segfault when linked statically to some libraries.
2012-02-14Make ht.h conform to Tor's code style againSebastian Hahn
When porting over changes from libevent, a bunch of tabs and a couple of long lines got introduced.
2012-02-13Port over the last ht.h changes from libevent: avoid _reserved identifiersNick Mathewson
2012-02-13Port over ht.h improvements from Libevent.Nick Mathewson
There is a facility (not used now in Tor) to avoid storing the hash of a given type if it is a fast-to-calculate hash. There are also a few ancient-openbsd compilation issues fixed here. The fact that Tor says INLINE while Libevent says inline remains unaddressed.
2012-02-13ht.h comment tweaks, upstreamed from libeventNick Mathewson
2012-02-12Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/Makefile.am src/or/Makefile.am
2012-02-10Properly protect paths to sed, sha1sum, opensslSebastian Hahn
in Makefile.am, we used it without quoting it, causing build failure if your openssl/sed/sha1sum happened to live in a directory with a space in it (very common on windows)
2012-02-10Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/tortls.c Conflict on comment near use of the new OPENSSL_V macro
2012-02-10Use correct CVE number for CVE-2011-4576. Found by fermenthor. bug 5066Nick Mathewson
2012-01-31Fix straggling MS_WINDOWS issues; add a changes fileNick Mathewson
There was one MS_WINDOWS that remained because it wasn't on a macro line; a few remaining uses (and the definition!) in configure.in; and a now-nonsensical stanza of eventdns_tor.h that previously defined 'WIN32' if it didn't exist.
2012-01-31Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
2012-01-31Actually enable the windows absolute-path codeNick Mathewson
Checking for "WINDOWS" is wrong; our magic macro is MS_WINDOWS Fixes bug 4973; bugfix on 0.2.3.11-alpha.
2012-01-18Rename nonconformant identifiers.Nick Mathewson
Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
2012-01-18Merge remote-tracking branch 'public/bug4533_part1'Nick Mathewson
Conflicts: src/common/compat.h
2012-01-18Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-01-18Fix SOCKET_OK test on win64.Nick Mathewson
Bugfix on 0.2.2.29-beta; partial fix for 4533; found by wanoskarnet
2012-01-17Warn if sizeof(tor_socket_t) != sizeof(SOCKET)Nick Mathewson
2012-01-17Use SOCKET_OK macros in even more placesNick Mathewson
Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET. Partial work for bug4533.
2012-01-16Convert instances of tor_malloc+tor_snprintf into tor_asprintfNick Mathewson
These were found by looking for tor_snprintf() instances that were preceeded closely by tor_malloc(), though I probably converted some more snprintfs as well. (In every case, make sure that the length variable (if any) is removed, renamed, or lowered, so that anything else that might have assumed a longer buffer doesn't exist.)
2012-01-16Rename smartlist_{v,}asprintf_add to smartlist_add_{v,}asprintfNick Mathewson