aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
Commit message (Collapse)AuthorAge
* Remove code for Windows CE supportNick Mathewson2014-06-20
| | | | | | | As far as I know, nobody has used this in ages. It would be a pretty big surprise if it had worked. Closes ticket 11446.
* Merge remote-tracking branch 'public/bug12227_024'Nick Mathewson2014-06-10
|\
| * Avoid illegal read off end of an array in prune_v2_cipher_listNick Mathewson2014-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is supposed to construct a list of all the ciphers in the "v2 link protocol cipher list" that are supported by Tor's openssl. It does this by invoking ssl23_get_cipher_by_char on each two-byte ciphersuite ID to see which ones give a match. But when ssl23_get_cipher_by_char cannot find a match for a two-byte SSL3/TLS ciphersuite ID, it checks to see whether it has a match for a three-byte SSL2 ciphersuite ID. This was causing a read off the end of the 'cipherid' array. This was probably harmless in practice, but we shouldn't be having any uninitialized reads. (Using ssl23_get_cipher_by_char in this way is a kludge, but then again the entire existence of the v2 link protocol is kind of a kludge. Once Tor 0.2.2 clients are all gone, we can drop this code entirely.) Found by starlight. Fix on 0.2.4.8-alpha. Fixes bug 12227.
| * Merge remote-tracking branch 'public/ticket11528_024' into maint-0.2.4Nick Mathewson2014-05-07
| |\
* | \ Merge remote-tracking branch 'public/ticket11528_024'Nick Mathewson2014-04-17
|\ \ \ | | |/ | |/|
| * | Elevate server TLS cipher preferences over clientNick Mathewson2014-04-17
| | | | | | | | | | | | | | | | | | | | | The server cipher list is (thanks to #11513) chosen systematically to put the best choices for Tor first. The client cipher list is chosen to resemble a browser. So let's set SSL_OP_CIPHER_SERVER_PREFERENCE to have the servers pick according to their own preference order.
* | | Uplift status.c unit test coverage with new test cases and macros.dana koch2014-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
* | | Merge remote-tracking branch 'public/bug11513_024'Nick Mathewson2014-04-15
|\ \ \ | | |/ | |/|
| * | New sort order for server choice of ciphersuites.Nick Mathewson2014-04-14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 175b2678, we allowed servers to recognize clients who are telling them the truth about their ciphersuites, and select the best cipher from on that list. This implemented the server side of proposal 198. In bugs 11492, 11498, and 11499, cypherpunks found a bunch of mistakes and omissions and typos in the UNRESTRICTED_SERVER_CIPHER_LIST we had. In #11513, I found a couple more. Rather than try to hand-edit this list, I wrote a short python script to generate our ciphersuite preferences from the openssl headers. The new rules are: * Require forward secrecy. * Require RSA (since our servers only configure RSA keys) * Require AES or 3DES. (This means, reject RC4, DES, SEED, CAMELLIA, and NULL.) * No export ciphersuites. Then: * Prefer AES to 3DES. * If both suites have the same cipher, prefer ECDHE to DHE. * If both suites have the same DHE group type, prefer GCM to CBC. * If both suites have the same cipher mode, prefer SHA384 to SHA256 to SHA1. * If both suites have the same digest, prefer AES256 to AES128.
| * Some anti-forensics paranoia...Florent Daigniere2014-02-06
| | | | | | | | sed -i 's/BN_free/BN_clear_free/g'
* | Merge branch 'bug8787_squashed'Nick Mathewson2014-03-31
|\ \
| * | Check strftime() return in tortls.cAndrea Shepard2014-03-31
| | |
* | | Fix warnings from doxygenNick Mathewson2014-03-25
|/ / | | | | | | | | | | Most of these are simple. The only nontrivial part is that our pattern for using ENUM_BF was confusing doxygen by making declarations that didn't look like declarations.
* | Some anti-forensics paranoia...Florent Daigniere2014-02-03
| | | | | | | | sed -i 's/BN_free/BN_clear_free/g'
* | Restore prop198 behavior from 4677 patchNick Mathewson2013-11-25
| | | | | | | | | | | | | | | | The previous commit from piet would have backed out some of proposal 198 and made servers built without the V2 handshake not use the unrestricted cipher list from prop198. Bug not in any released Tor.
* | Restore ability to build with V2_HANDSHAKE_SERVERNick Mathewson2013-11-25
| | | | | | | | Fixes bug 4677; bugfix on 0.2.3.2-alpha. Fix by "piet".
* | Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson2013-10-31
|\|
| * Merge remote-tracking branch 'public/bug9780_024_v2' into maint-0.2.4Nick Mathewson2013-10-31
| |\
| | * Switch ECDHE group default logic for bridge/relay TLSNick Mathewson2013-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the manpage, bridges use P256 for conformity and relays use P224 for speed. But skruffy points out that we've gotten it backwards in the code. In this patch, we make the default P256 for everybody. Fixes bug 9780; bugfix on 0.2.4.8-alpha.
* | | Merge remote-tracking branch 'public/bug6055_v2_024'Nick Mathewson2013-09-25
|\| |
| * | Re-enable TLS 1.[12] when building with OpenSSL >= 1.0.1eNick Mathewson2013-09-25
| |/ | | | | | | | | | | | | | | | | | | To fix #6033, we disabled TLS 1.1 and 1.2. Eventually, OpenSSL fixed the bug behind #6033. I've considered alternate implementations that do more testing to see if there's secretly an OpenSSL 1.0.1c or something that secretly has a backport of the OpenSSL 1.0.1e fix, and decided against it on the grounds of complexity.
* | Completely refactor how FILENAME_PRIVATE worksNick Mathewson2013-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
* | Fix #9043 - simplyfy the code and use EVP_PKEY_cmp instead of pkey_eq / ↵Marek Majkowski2013-06-12
| | | | | | | | tor_tls_evp_pkey_eq
* | Bug #5170 - make pkey_eq testable, introduce test_tortls.cMarek Majkowski2013-06-10
| |
* | Bug 5170 - simplify i2d_PublicKey in pkey_eqMarek Majkowski2013-06-06
| |
* | Bug #5170 - simplify i2d_X509Marek Majkowski2013-06-06
|/
* Track TLS overhead: diagnostic for bug 7707Nick Mathewson2013-03-11
|
* start part-way through the ssl cert lifetimeRoger Dingledine2013-03-10
| | | | | also, snap the start time and end time to a day boundary, since most certs in the wild seem to do this.
* Rename log() to tor_log() for loggingNick Mathewson2013-02-01
| | | | | | | | | | | | | This is meant to avoid conflict with the built-in log() function in math.h. It resolves ticket 7599. First reported by dhill. This was generated with the following perl script: #!/usr/bin/perl -w -i -p s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g; s/\blog\(/tor_log\(/g;
* Merge remote-tracking branch 'public/bug6302'Nick Mathewson2013-01-17
|\
| * Refactor: Use SOCK_ERRNO to avoid some #ifdef _WIN32sNick Mathewson2013-01-16
| | | | | | | | Fixes ticket 6302
* | Merge branch '024_msvc_squashed'Nick Mathewson2013-01-16
|\ \ | |/ |/| | | | | | | Conflicts: src/or/or.h srcwin32/orconfig.h
| * When building with MSVC, call every enum bitfield unsignedNick Mathewson2013-01-16
| | | | | | | | Fixes bug 7305.
* | Update the copyright date to 201.Nick Mathewson2013-01-16
| |
* | One last fix for a warning on non-EC systemsNick Mathewson2012-12-25
| |
* | Be more noncomittal about performance improvement of uint128 backend.Nick Mathewson2012-12-25
| |
* | Make ECDHE group configurable: 224 for public, 256 for bridges (default)Nick Mathewson2012-12-25
| |
* | Inform the user if they're passing up a 10x ECDH speedup.Nick Mathewson2012-12-25
| |
* | Let servers choose better ciphersuites when clients support themNick Mathewson2012-12-25
| | | | | | | | | | | | | | | | | | | | | | | | This implements the server-side of proposal 198 by detecting when clients lack the magic list of ciphersuites that indicates that they're lying faking some ciphers they don't really have. When clients lack this list, we can choose any cipher that we'd actually like. The newly allowed ciphersuites are, currently, "All ECDHE-RSA ciphers that openssl supports, except for ECDHE-RSA-RC4". The code to detect the cipher list relies on on (ab)use of SSL_set_session_secret_cb.
* | Remove the address argument from client cipher classification fnsNick Mathewson2012-12-25
| |
* | Cache the type of client cipher list we have in the tor_tls_tNick Mathewson2012-12-25
| | | | | | | | | | | | We already use this classification for deciding whether (as a server) to do a v2/v3 handshake, and we're about to start using it for deciding whether we can use good ciphersuites too.
* | prop198: Detect the list of ciphersuites we used to lie about havingNick Mathewson2012-12-25
| | | | | | | | | | | | | | This is less easy than you might think; we can't just look at the client ciphers list, since openssl doesn't remember client ciphers if it doesn't know about them. So we have to keep a list of the "v2" ciphers, with the ones we don't know about removed.
* | Configure SSL context to know about using P-256 for ECDHE.Nick Mathewson2012-12-25
|/
* In comments and logs, say "UTC" not "GMT"Nick Mathewson2012-11-23
| | | | | | | Fix for #6113. Note that the RFC1123 times we generate still all say 'GMT'. I'm going to suggest this is not worth changing.
* Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-11-08
|\ | | | | | | | | | | Conflicts: src/common/crypto.c src/or/rendservice.c
| * Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson2012-11-08
| | | | | | | | | | | | | | | | | | | | Apparently some compilers like to eliminate memset() operations on data that's about to go out-of-scope. I've gone with the safest possible replacement, which might be a bit slow. I don't think this is critical path in any way that will affect performance, but if it is, we can work on that in 0.2.4. Fixes bug 7352.
* | touch-upsRoger Dingledine2012-10-26
| |
* | Change changes file and comment for 7189, for making it 0.2.4-only for nowNick Mathewson2012-10-24
| |
* | Merge remote-tracking branch 'public/bug7189_tentative'Nick Mathewson2012-10-24
|\ \
| * | Only disable TLS tickets when being/acting as a server.Nick Mathewson2012-10-24
| |/ | | | | | | Fix for bug 7189.