Linus Nordberg
734fad4103
Make relays handle an address suggestion from a directory server giving an 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-28 22:16:55 +02:00
Nick Mathewson
433d757846
Reject SOCKS requests for "localhost" or ".local"
...
Sending them on is futile, since we will be told "127.0.0.1" and then
think we've been lied to. Partial fix for 2822.
2012-03-28 03:19:00 -04:00
Nick Mathewson
01905a6ef9
Excise PK_NO_PADDING entirely: Unpadded RSA is silly.
...
We never use it, so having it around is pointless.
Suggested by Sebastian
2012-03-27 22:38:06 -04:00
Nick Mathewson
55c3e29669
Use OpenSSL 1.0.1's EVP aes_ctr implementation when available
...
This should be really fast on Intel chips.
2012-03-27 22:38:06 -04:00
Nick Mathewson
de0dca0de7
Refactor the API for setting up a block cipher.
...
It allows us more flexibility on the backend if the user needs to
specify the key and IV at setup time.
2012-03-27 22:37:56 -04:00
Nick Mathewson
00b4784575
Remove support for PK_NO_PADDING in crypto_pk_public_hybrid_encrypt
...
We never use it, and it would be a stupid thing if we started using it.
2012-03-27 22:37:55 -04:00
Nick Mathewson
80b2756b53
Log statement to help track down bug4091
2012-03-27 18:28:39 -04:00
Nick Mathewson
650e2aac46
Merge commit 'a5704b1c624c9a808f52f3a125339f00e2b9a378' into maint-0.2.2
2012-03-26 13:59:49 -04:00
Nick Mathewson
bd0657602d
get_mozilla_ciphers: look at ssl3con.c, not sslenum.c
2012-03-14 18:36:58 -04:00
Nick Mathewson
c2ed9a2940
get_mozilla_ciphers: output lowercase hex.
2012-03-14 18:19:21 -04:00
Nick Mathewson
c5dca8f208
Try to make get_mozilla_ciphers output the right macros in the right order
2012-03-14 17:53:17 -04:00
Nick Mathewson
092b9aca8c
Have get_mozilla_ciphers take sourcedirs as arguments
2012-03-14 16:53:39 -04:00
Nick Mathewson
a6a905cc11
Make get_mozilla_ciphers script a little more regexy and readable
2012-03-14 16:45:38 -04:00
Nick Mathewson
db07aaf45f
Script to generate ciphers.inc by Arturo
2012-03-14 16:01:15 -04:00
George Kadianakis
aae570b493
Close fds on pipe() error in tor_spawn_background().
2012-03-12 12:41:29 -04:00
Sebastian Hahn
d916fc38b6
Stop using MAX_PATH, it might not be defined
...
This broke compilation on Hurd
2012-03-10 16:53:01 +01:00
Nick Mathewson
c13dc5170f
Merge remote-tracking branch 'origin/maint-0.2.2'
2012-03-09 11:54:45 -05:00
Nick Mathewson
be0535f00b
Correctly handle broken escape sequences in torrc values
...
Previously, malformatted torrc values could crash us.
Patch by Esteban Manchado. Fixes bug 5090; fix on 0.2.0.16-alpha.
2012-03-09 11:50:22 -05:00
Esteban Manchado Velázquez
8a633a3ebd
Small fix in tor_sscanf documentation
2012-03-08 20:49:23 -05:00
Esteban Manchado Velázquez
a753ef8517
Fix typo in config parser documentation
2012-03-08 20:49:17 -05:00
Nick Mathewson
5daa765bd1
Merge remote-tracking branch 'origin/maint-0.2.2'
2012-03-08 14:15:18 -05:00
Sebastian Hahn
fe50b676bc
Fix compile warnings in openbsd malloc
2012-03-08 19:28:59 +01:00
Nick Mathewson
77a7a980d0
Don't leak the env_vars_sorted smartlist in process_environment_make
...
Found by Coverity.
No changes/ file, because this bug has not been in a release yet.
2012-02-29 19:49:26 -05:00
Nick Mathewson
a5704b1c62
Add a sha256 hmac function, with tests
...
(cherry picked from commit fdbb9cdf74
)
2012-02-22 05:46:08 -08:00
Nick Mathewson
81fe3e438b
Merge remote-tracking branch 'sebastian/bug5161'
2012-02-20 13:00:17 -05:00
Robert Ransom
cd029f0ca3
Fix crypto_hmac_sha256 documentation comment
2012-02-20 02:47:10 -08:00
Sebastian Hahn
bc66878bde
Don't redeclare environ if std headers already did
...
This would cause a redundant redeclaration warning on some versions of
Linux otherwise.
2012-02-19 16:52:38 +01:00
Nick Mathewson
1d36693570
Use get_environment(), not environ.
2012-02-17 11:50:19 -05:00
Nick Mathewson
eaedcba493
Merge branch 'bug5105-v2-squashed'
...
Conflicts:
src/or/transports.c
2012-02-17 11:50:10 -05:00
Robert Ransom
33552c16ca
Heap-allocate strings returned by get_current_process_environment_variables
2012-02-17 11:42:21 -05:00
Robert Ransom
c0808b795f
Pass process_environment_t * to tor_spawn_background
...
Now tor_spawn_background's prototype is OS-independent.
2012-02-17 11:42:20 -05:00
Robert Ransom
ee3a49d6ed
Remove (void)envp from tor_spawn_background
...
The envp argument is used on Windows.
2012-02-17 11:42:20 -05:00
Robert Ransom
340d906419
Change type of unixoid_environment_block to match tor_spawn_background's arg
2012-02-17 11:42:20 -05:00
Robert Ransom
d37a1ec8c6
Add set_environment_variable_in_smartlist
2012-02-17 11:42:20 -05:00
Robert Ransom
0ba93e184a
Add get_current_process_environment_variables
2012-02-17 11:42:19 -05:00
Robert Ransom
98cec14982
Add process_environment_make and related utilities
2012-02-17 11:42:19 -05:00
Robert Ransom
806e0f7e19
Add tor_calloc
2012-02-17 11:42:19 -05:00
Sebastian Hahn
efb7b9dec1
Use _NSGetEnviron() instead of environ where required
...
OS X would otherwise crash with a segfault when linked statically to
some libraries.
2012-02-14 11:18:39 -05:00
Nick Mathewson
077b9f19a4
If SOCK_CLOEXEC and friends fail, fall back to regular socket() calls
...
Since 0.2.3.1-alpha, we've supported the Linux extensions to socket(),
open(), socketpair(), and accept() that enable us to create an fd and
make it close-on-exec with a single syscall. This not only saves us a
syscall (big deal), but makes us less vulnerable to race conditions
where we open a socket and then exec before we can make it
close-on-exec.
But these extensions are not supported on all Linuxes: They were added
between 2.6.23 or so and 2.6.28 or so. If you were to build your Tor
against a recent Linux's kernel headers, and then run it with a older
kernel, you would find yourselve unable to open sockets. Ouch!
The solution here is that, when one of these syscalls fails with
EINVAL, we should try again in the portable way. This adds an extra
syscall in the case where we built with new headers and are running
with old ones, but it will at least allow Tor to work.
Fixes bug 5112; bugfix on 0.2.3.1-alpha.
2012-02-14 10:34:06 -05:00
Sebastian Hahn
efcdc930fb
Make ht.h conform to Tor's code style again
...
When porting over changes from libevent, a bunch of tabs and a couple of
long lines got introduced.
2012-02-14 11:13:06 +01:00
Nick Mathewson
a31fb42d2e
Port over the last ht.h changes from libevent: avoid _reserved identifiers
2012-02-13 18:40:30 -05:00
Nick Mathewson
107f604f31
Port over ht.h improvements from Libevent.
...
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-13 18:06:40 -05:00
Nick Mathewson
1e9400d9c8
ht.h comment tweaks, upstreamed from libevent
2012-02-13 17:56:13 -05:00
Nick Mathewson
4aa0aa0300
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/Makefile.am
src/or/Makefile.am
2012-02-12 23:27:31 -05:00
Sebastian Hahn
8ce6722d76
Properly protect paths to sed, sha1sum, openssl
...
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-10 20:12:03 +01:00
Nick Mathewson
8855b2a90c
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/tortls.c
Conflict on comment near use of the new OPENSSL_V macro
2012-02-10 10:56:37 -05:00
Nick Mathewson
2da0efb547
Use correct CVE number for CVE-2011-4576. Found by fermenthor. bug 5066
2012-02-10 10:55:39 -05:00
Nick Mathewson
79a80c88ee
Fix straggling MS_WINDOWS issues; add a changes file
...
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-31 15:48:47 -05:00
Nick Mathewson
5cf9167f91
Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32
...
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-31 15:48:47 -05:00
Nick Mathewson
48424772aa
Actually enable the windows absolute-path code
...
Checking for "WINDOWS" is wrong; our magic macro is MS_WINDOWS
Fixes bug 4973; bugfix on 0.2.3.11-alpha.
2012-01-31 10:42:41 -05:00