aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-02-10
|\ | | | | | | | | | | | | Conflicts: src/common/tortls.c Conflict on comment near use of the new OPENSSL_V macro
| * Use correct CVE number for CVE-2011-4576. Found by fermenthor. bug 5066Nick Mathewson2012-02-10
| |
* | Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | | | | | | | | | | | | 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; }
* | Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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;
* | Make openssl 0.9.8l log message accurateNick Mathewson2012-01-11
| | | | | | | | fixes 4837
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-01-11
|\|
| * Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2012-01-11
| |\
| | * Fix a compilation warning for our bug4822 fix on 64-bit linuxNick Mathewson2012-01-11
| | |
* | | Add macros to construct openssl version numbersNick Mathewson2012-01-10
| | | | | | | | | | | | | | | It's a pain to convert 0x0090813f to and from 0.9.8s-release on the fly, so these macros should help.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-01-09
|\| |
| * | Fix comment about TLSv1_method() per comments by wanoskarnetNick Mathewson2012-01-09
| | |
* | | Merge branch 'maint-0.2.2'Roger Dingledine2012-01-08
|\| |
| * | add a note from wanoskarnetRoger Dingledine2012-01-08
| | | | | | | | | | | | he disagrees about what the code that we decided not to use would do
* | | Change to use SSL_state_string_long() instead of homebrew ↵Emile Snyder2012-01-06
| | | | | | | | | | | | ssl_state_to_string() function.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-01-05
|\| |
| * | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2012-01-05
| |\|
| | * Log at info level when disabling SSLv3Robert Ransom2012-01-05
| | |
| | * Disable SSLv3 when using a not-up-to-date opensslNick Mathewson2012-01-05
| | | | | | | | | | | | This is to address bug 4822, and CVE-2011-4576.
* | | note some dead code. if i'm right, should this be removed?Roger Dingledine2012-01-05
| | |
* | | indent; add commentNick Mathewson2011-12-08
| | | | | | | | | | | | | | | | | | This re-applies 40a87c4c08be0cdd87a3df283f285b3c2a0c8445 which got accidentally reverted in 75134c6c86e54c10fd9e11c4345aadcdabc0f8fb. Thanks asn for spotting this.
* | | Revert "Refactor the SSL_set_info_callback() callbacks."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 69a821ea1c9357acdd5aa1c9e23fd030b01cb5a9.
* | | Revert "Detect renegotiation when it actually happens."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 4fd79f9def28996552b5739792f428c2514de1f6.
* | | Revert "Detect and deny excess renegotiations attempts."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit ecd239e3b577705e0669d47293a2e755cf93cec0.
* | | Revert "Get rid of tor_tls_block_renegotiation()."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 340809dd224b244675496e301d3ba154a6fe68d0.
* | | Revert "Also handle needless renegotiations in SSL_write()."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit e2b3527106e0747f652e2f28fa087d9874e0e2ce.
* | | Revert "Fix issues pointed out by nickm."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit e097bffaed72af6b19f7293722021196bb94de1e.
* | | Revert "Use callback-driven approach to block renegotiations."Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 406ae1ba5ad529a4d0e710229dab6ed645d42b50.
* | | Revert "Refactor tor_event_base_once to do what we actually want"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 7920ea55b8d994268d2b07f27316b0f34d8f27e5.
* | | Revert "Fix some wide lines in tortls.c"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit e8dde3aabd3e1292d381eb4269c6457548dca6b9.
* | | Revert "Don't schedule excess_renegotiations_callback unless it's set"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 617617e21a2d30a86cea9c8f7043333078f2e8f8.
* | | Revert "indent; add comment"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit 40a87c4c08be0cdd87a3df283f285b3c2a0c8445.
* | | Revert "Make pending libevent actions cancelable"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit aba25a6939a5907d40dbcff7433a8c130ffd12ad.
* | | Revert "Set renegotiation callbacks immediately on tls inititation"Nick Mathewson2011-12-06
| | | | | | | | | | | | This reverts commit e27a26d568a257cf350814a9abfa47d3b41ad9f3.
* | | Merge branch 'bug4587_v2'Nick Mathewson2011-11-29
|\ \ \
| * | | Set renegotiation callbacks immediately on tls inititationNick Mathewson2011-11-29
| | | | | | | | | | | | | | | | | | | | This way, we can't miss a renegotiation attempt in a v2 handshake, or miss excess renegotiation attempts. Partial fix for bug 4587.
* | | | Make pending libevent actions cancelableNick Mathewson2011-11-29
| | | | | | | | | | | | | | | | | | | | This avoids a dangling pointer issue in the 3412 code, and should fix bug 4599.
* | | | indent; add commentNick Mathewson2011-11-27
| | | |
* | | | Merge remote-tracking branch 'asn/bug4584'Nick Mathewson2011-11-27
|\ \ \ \ | |/ / / |/| | |
| * | | Use random bytes as our certificate serial numbers.George Kadianakis2011-11-27
| | | | | | | | | | | | | | | | | | | | Instead of using time(NULL) in our certificate serial numbers, use eight random bytes as suggested in proposal 179.
* | | | Don't schedule excess_renegotiations_callback unless it's setNick Mathewson2011-11-27
|/ / / | | | | | | | | | Partial fix for bug 4587; reported by "frosty_un".
* | | Fix some wide lines in tortls.cNick Mathewson2011-11-25
| | |
* | | Refactor tor_event_base_once to do what we actually wantNick Mathewson2011-11-25
| | | | | | | | | | | | | | | This version avoids the timeout system entirely, gives a nicer interface, and lets us manage allocation explicitly.
* | | Merge remote-tracking branch 'asn/bug4312'Nick Mathewson2011-11-25
|\ \ \
| * | | Use callback-driven approach to block renegotiations.George Kadianakis2011-11-13
| | | | | | | | | | | | | | | | Also use this new approach in the bufferevents-enabled case.
| * | | Fix issues pointed out by nickm.George Kadianakis2011-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename tor_tls_got_server_hello() to tor_tls_got_client_hello(). - Replaced some aggressive asserts with LD_BUG logging. They were the innocent "I believe I understand how these callbacks work, and this assert proves it" type of callbacks, and not the "If this statement is not true, computer is exploding." type of callbacks. - Added a changes file.
| * | | Also handle needless renegotiations in SSL_write().George Kadianakis2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL_read(), SSL_write() and SSL_do_handshake() can always progress the SSL protocol instead of their normal operation, this means that we must be checking for needless renegotiations after they return. Introduce tor_tls_got_excess_renegotiations() which makes the tls->server_handshake_count > 2 check for us, and use it in tor_tls_read() and tor_tls_write(). Cases that should not be handled: * SSL_do_handshake() is only called by tor_tls_renegotiate() which is a client-only function. * The SSL_read() in tor_tls_shutdown() does not need to be handled, since SSL_shutdown() will be called if SSL_read() returns an error.
| * | | Get rid of tor_tls_block_renegotiation().George Kadianakis2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we check for naughty renegotiations using tor_tls_t.server_handshake_count we don't need that semi-broken function (at least till there is a way to disable rfc5746 renegotiations too).
| * | | Detect and deny excess renegotiations attempts.George Kadianakis2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch 'server_handshake_count' from a uint8_t to 2 unsigned int bits. Since we won't ever be doing more than 3 handshakes, we don't need the extra space. Toggle tor_tls_t.got_renegotiate based on the server_handshake_count. Also assert that when we've done two handshakes as a server (the initial SSL handshake, and the renegotiation handshake) we've just renegotiated. Finally, in tor_tls_read() return an error if we see more than 2 handshakes.
| * | | Detect renegotiation when it actually happens.George Kadianakis2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renegotiation callback was called only when the first Application Data arrived, instead of when the renegotiation took place. This happened because SSL_read() returns -1 and sets the error to SSL_ERROR_WANT_READ when a renegotiation happens instead of reading data [0]. I also added a commented out aggressive assert that I won't enable yet because I don't feel I understand SSL_ERROR_WANT_READ enough. [0]: Look at documentation of SSL_read(), SSL_get_error() and SSL_CTX_set_mode() (SSL_MODE_AUTO_RETRY section).
| * | | Refactor the SSL_set_info_callback() callbacks.George Kadianakis2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce tor_tls_state_changed_callback(), which handles every SSL state change. The new function tor_tls_got_server_hello() is called every time we send a ServerHello during a v2 handshake, and plays the role of the previous tor_tls_server_info_callback() function.