summaryrefslogtreecommitdiff
path: root/src/common/tortls.c
AgeCommit message (Collapse)Author
2011-01-25Handle failing cases of DH allocationNick Mathewson
2011-01-24Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson
Our regular DH parameters that we use for circuit and rendezvous crypto are unchanged. This is yet another small step on the path of protocol fingerprinting resistance.
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-11-23Fix compilation with mingw and OpenSSL 0.9.8m+mingw-san
2010-11-21Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
2010-11-20Do not set the hostname TLS extension server-side; only client-sideNick Mathewson
This may fix bug 2204, and resolve the incompatibility with openssl 0.9.8p/1.0.0b.
2010-10-04Maintain separate server and client TLS contexts.Robert Ransom
Fixes bug #988.
2010-10-04Refactor tor_tls_context_new:Robert Ransom
* Make tor_tls_context_new internal to tortls.c, and return the new tor_tls_context_t from it. * Add a public tor_tls_context_init wrapper function to replace it.
2010-10-04Correct a bogus comment.Robert Ransom
Whether or not OpenSSL reference-counts SSL_CTX objects is irrelevant; what matters is that Tor reference-counts its wrapper objects for SSL_CTXs.
2010-10-04Correct a couple of log messages in tortls.cRobert Ransom
2010-10-04Fix several comments in tortls.cRobert Ransom
2010-07-26Fix compilation with mingw and OpenSSL 0.9.8m+mingw-san
2010-07-09Rename log.h to torlog.hNick Mathewson
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
2010-05-24moved wince related includes and defs to compat.h where possible, removed ↵valerino
unused/redundant wince includes
2010-04-20Demote a warning about missing client ciphersSebastian Hahn
2010-04-20minor cleanupsRoger Dingledine
2010-04-15Merge commit 'origin/maint-0.2.1'Nick Mathewson
2010-04-13Fix renegotiation on OpenSSL versions that backport RFC5746.Nick Mathewson
Our code assumed that any version of OpenSSL before 0.9.8l could not possibly require SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION. This is so... except that many vendors have backported the flag from later versions of openssl when they backported the RFC5476 renegotiation feature. The new behavior is particularly annoying to detect. Previously, leaving SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION unset meant that clients would fail to renegotiate. People noticed that one fast! Now, OpenSSL's RFC5476 support means that clients will happily talk to any servers there are, but servers won't accept renegotiation requests from unpatched clients unless SSL_OP_ALLOW_etc is set. More fun: servers send back a "no renegotiation for you!" error, which unpatched clients respond to by stalling, and generally producing no useful error message. This might not be _the_ cause of bug 1346, but it is quite likely _a_ cause for bug 1346.
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2010-02-21fix typo and garbage grammarRoger Dingledine
2010-02-18Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: ChangeLog configure.in contrib/tor-mingw.nsi.in src/win32/orconfig.h
2010-02-18Fix compileSebastian Hahn
2010-02-17Even more conservative option-setting for SSL renegotiation.Nick Mathewson
This time, set the SSL3_FLAGS_ALLOW_UNSAFE_RENEGOTIATION flag on every version before OpenSSL 0.9.8l. I can confirm that the option value (0x0010) wasn't reused until OpenSSL 1.0.0beta3.
2010-01-31Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-01-31Revise OpenSSL fix to work with OpenSSL 1.0.0beta*Nick Mathewson
In brief: you mustn't use the SSL3_FLAG solution with anything but 0.9.8l, and you mustn't use the SSL_OP solution with anything before 0.9.8m, and you get in _real_ trouble if you try to set the flag in 1.0.0beta, since they use it for something different. For the ugly version, see my long comment in tortls.c
2010-01-29Decide whether to use SSL flags based on runtime OpenSSL version.Nick Mathewson
We need to do this because Apple doesn't update its dev-tools headers when it updates its libraries in a security patch. On the bright side, this might get us out of shipping a statically linked OpenSSL on OSX. May fix bug 1225. [backported]
2010-01-29Detect the correct versions of openssl for tls negotiation fixNick Mathewson
Since it doesn't seem to hurt, we should use _both_ fixes whenever we see OpenSSL 0.9.7L .. 0.9.8, or OpenSSL 0.9.8L..
2010-01-29Decide whether to use SSL flags based on runtime OpenSSL version.Nick Mathewson
We need to do this because Apple doesn't update its dev-tools headers when it updates its libraries in a security patch. On the bright side, this might get us out of shipping a statically linked OpenSSL on OSX. May fix bug 1225.
2010-01-23Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-01-22Avoid a possible crash in tls_log_errors.Nick Mathewson
We were checking for msg==NULL, but not lib or proc. This case can only occur if we have an error whose string we somehow haven't loaded, but it's worth coding defensively here. Spotted by rieo on IRC.
2009-12-12Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson
2009-12-12*_free functions now accept NULLSebastian Hahn
Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
2009-12-04Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-12-04Improved workaround for disabled OpenSSL renegotiation.Martin Peck
It turns out that OpenSSL 0.9.8m is likely to take a completely different approach for reenabling renegotiation than OpenSSL 0.9.8l did, so we need to work with both. :p Fixes bug 1158. (patch by coderman; commit message by nickm)
2009-11-06Merge commit 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/tortls.c
2009-11-05Make Tor work with OpenSSL 0.9.8lNick Mathewson
To fix a major security problem related to incorrect use of SSL/TLS renegotiation, OpenSSL has turned off renegotiation by default. We are not affected by this security problem, however, since we do renegotiation right. (Specifically, we never treat a renegotiated credential as authenticating previous communication.) Nevertheless, OpenSSL's new behavior requires us to explicitly turn renegotiation back on in order to get our protocol working again. Amusingly, this is not so simple as "set the flag when you create the SSL object" , since calling connect or accept seems to clear the flags. For belt-and-suspenders purposes, we clear the flag once the Tor handshake is done. There's no way to exploit a second handshake either, but we might as well not allow it.
2009-09-24Fix compilation on OpenSSLs with unusual state lists.Nick Mathewson
"Unusual" in this context means "not the same as nickm's." We should grow a better list later. (Also, move TLS state table to a separate header.)
2009-09-24Debugging logs for TLS handshakeNick Mathewson
The big change is to add a function to display the current SSL handshake state, and to log it everywhere reasonable. (A failure in SSL23_ST_CR_SRVR_HELLO_A is different from one in SSL3_ST_CR_SESSION_TICKET_A.) This patch also adds a new log domain for OR handshaking, so you can pull out all the handshake log messages without having to run at debug for everything. For example, you'd just say "log notice-err [handshake]debug-err file tor.log".
2009-09-17Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-09-17Work around a memory leak in openssl 0.9.8g (and maybe others)Nick Mathewson
2009-09-01Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-05-31Merge branch 'hardware_accel_improvements'Nick Mathewson
2009-05-27Spelling fixes in comments and stringsNick Mathewson
2009-05-23Add support for dynamic OpenSSL hardware crypto acceleration engines.Martin Peck
2009-05-04Update copyright to 2009.Karsten Loesing
2009-05-02Update copyright to 2009.Karsten Loesing
2009-03-09doxygen tweakRoger Dingledine
svn:r18818