aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
AgeCommit message (Collapse)Author
2015-10-21Merge remote-tracking branch 'public/bug17404_024' into maint-0.2.7Nick Mathewson
2015-10-21Fix the return valueNick Mathewson
2015-10-21Merge remote-tracking branch 'public/bug17404_024' into maint-0.2.7Nick Mathewson
2015-10-21Check for len < 4 in dn_indicates_v3_certNick Mathewson
Without this check, we potentially look up to 3 characters before the start of a malloc'd segment, which could provoke a crash under certain (weird afaik) circumstances. Fixes 17404; bugfix on 0.2.6.3-alpha.
2015-10-06Work around openssl declaring x509_get_not{Before,After} as functionsNick Mathewson
Now that x509_get_not{Before,After} are functions in OpenSSL 1.1 (not yet releasesd), we need to define a variant that takes a const pointer to X509 and returns a const pointer to ASN1_time. Part of 17237. I'm not convinced this is an openssl bug or a tor bug. It might be just one of those things.
2015-09-13Use SSL_get_client_ciphers() on openssl 1.1+, not SSL_get_ciphers...Nick Mathewson
(which isn't correct.) Fixes bug 17047; bugfix on 0.2.7.2-alpha, introduced by the merge in 0030765e04d8dfe3dfaf8124b01a4d578b7d8ceb, apparently.
2015-06-29Remove checks for visual C 6.Nick Mathewson
2015-06-16Fix spacing in tortls.cteor
2015-06-11Fix clang address of struct member always non-NULL in SSL master keyteor
clang complains that the address of struct member in an assert in SSL_SESSION_get_master_key is always non-NULL. Instead, check each pointer argument is non-NULL before using it. Fix on f90a704f1258 from 27 May 2015, not in any released version of tor.
2015-06-02Merge remote-tracking branch 'public/bug15760_hard_026_v2'Nick Mathewson
2015-06-02A few more minor OpenSSL 1.1 fixes.Yawning Angel
* Use `TLS_method()` instead of the deprecated `SSLv23_method()` * Fix one missed conversion to `SSL_CIPHER_get_id()`
2015-06-02Merge remote-tracking branch 'teor/bug16115-minor-fixes'Nick Mathewson
2015-06-03Silence unused variable warnings in find_cipher_by_idteor
Unused variable warnings were still generated under some versions of OpenSSL. Instead, make sure all variables are used under all versions. Fix on 496df21c89d1, not in any released version of tor.
2015-06-02Merge remote-tracking branch 'public/bug15760_hard_026_v2'Nick Mathewson
Conflicts: src/common/tortls.c
2015-06-02Use autoconf, not OPENSSL_VERSION_NUMBER, to detect SSL_CIPHER_findNick Mathewson
Repairs build with libressl
2015-06-02Use accessor functions for client_random/server_random/master_keyNick Mathewson
If OpenSSL accepts my patch to introduce these functions, they'll be a way to help Tor work with OpenSSL 1.1.
2015-06-01Appease make check-spacesAndrea Shepard
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28Tests for AUTHENTICATE cell functionality.Nick Mathewson
2015-05-28Start testing cell encoders/processers for the v3 handshake.Nick Mathewson
An earlier version of these tests was broken; now they're a nicer, more robust, more black-box set of tests. The key is to have each test check a handshake message that is wrong in _one_ way.
2015-05-26Stop looking at session->ciphers when possibleNick Mathewson
If the OpenSSL team accepts my patch to add an SSL_get_client_ciphers function, this patch will make Tor use it when available, thereby working better with openssl 1.1.
2015-05-26Remove rectify_client_ciphers as needless.Nick Mathewson
We previously used this function instead of SSL_set_cipher_list() to set up a stack of client SSL_CIPHERs for these reasons: A) In order to force a particular order of the results. B) In order to be able to include dummy entries for ciphers that this build of openssl did not support, so we could impersonate Firefox harder. But we no longer do B, since we merged proposal 198 and stopped lying about what ciphers we know. And A was actually pointless, since I had misread the implementation of SSL_set_cipher_list(). It _does_ do some internal sorting, but that is pre-sorting on the master list of ciphers, not sorting on the user's preferred order.
2015-05-26Revert "Try using SSL_get_ciphers in place of session->ciphers"Nick Mathewson
This reverts commit 67964cfa787461bc56380fe46439fd5c9863bb4f. It was the cause of #16153, and was not in any released Tor. We need a better solution for getting session->ciphers.
2015-05-22Revert "Try using SSL_get_ciphers in place of session->ciphers"Nick Mathewson
This reverts commit 67964cfa787461bc56380fe46439fd5c9863bb4f. It was the cause of #16153, and was not in any released Tor. We need a better solution for getting session->ciphers.
2015-05-21Remove support for OpenSSL without ECC.Yawning Angel
As OpenSSL >= 1.0.0 is now required, ECDHE is now mandatory. The group has to be validated at runtime, because of RedHat lawyers (P224 support is entirely missing in the OpenSSL RPM, but P256 is present and is the default). Resolves ticket #16140.
2015-05-21Generate error ASAP if building with too-old opensslNick Mathewson
2015-05-21move "version" declaration to avoid "set but not used" warningsNick Mathewson
2015-05-2019:38 < Yawning> nickm: you left the "+#ifndef SSL_clear_mode" block in ;_;Nick Mathewson
2015-05-20Merge branch 'bug16034_no_more_openssl_098_squashed'Nick Mathewson
Conflicts: src/test/testing_common.c
2015-05-20Stop poking SSL_CTX->comp_methodsNick Mathewson
2015-05-20Use SSL_CIPHER accessor functionsNick Mathewson
2015-05-20Use SSL_CIPHER_find where possible.Nick Mathewson
2015-05-20Remove code to support OpenSSL 0.9.8Nick Mathewson
2015-05-20Try using SSL_get_ciphers in place of session->ciphersNick Mathewson
This should help openssl 1.1. On pre-1.1, we double-check that these two methods give us the same list, since the underlying code is awfully hairy.
2015-05-20Tweak rectify_client_ciphers to work with openssl 1.1Nick Mathewson
The key here is to never touch ssl->cipher_list directly, but only via SSL_get_ciphers(). But it's not so simple. See, if there is no specialized cipher_list on the SSL object, SSL_get_ciphers returns the cipher_list on the SSL_CTX. But we sure don't want to modify that one! So we need to use SSL_set_cipher_list first to make sure that we really have a cipher list on the SSL object.
2015-05-13tor_tls_get_buffer_sizes() will not work on openssl 1.1. Patch from yawningNick Mathewson
2015-05-13Use SSL_state() to inspect the state of SSL objects.Nick Mathewson
2015-05-13Use SSL_clear_mode where available.Nick Mathewson
2015-05-13SSL_clear_mode exists; we can use it.Nick Mathewson
2015-05-13Stop accessing 'ssl->s3->flags' when we are using openssl 1.1Nick Mathewson
This field was only needed to work with the now-long-gone (I hope, except for some horrible apples) openssl 0.9.8l; if your headers say you have openssl 1.1, you won't even need it.
2015-05-07Merge branch 'writing_tests'Nick Mathewson
2015-05-07Write the outlines of a WritingTests.txt documentNick Mathewson
Also, add some sample tests to be examples.
2015-04-23Fix some conversion problemsNick Mathewson
2015-04-21Add crypto_rand_int_range() and use itDavid Goulet
Incidently, this fixes a bug where the maximum value was never used when only using crypto_rand_int(). For instance this example below in rendservice.c never gets to INTRO_POINT_LIFETIME_MAX_SECONDS. int intro_point_lifetime_seconds = INTRO_POINT_LIFETIME_MIN_SECONDS + crypto_rand_int(INTRO_POINT_LIFETIME_MAX_SECONDS - INTRO_POINT_LIFETIME_MIN_SECONDS); Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-03-14Remove relative paths to header files.cypherpunks
The paths are already in the directory search path of the compiler therefore no need to include them in the source code.
2015-02-24Fix whitespace from tor_x509_cert renameNick Mathewson
2015-02-24Mechanical rename: tor_cert_t -> tor_x509_cert_tNick Mathewson
2015-02-02Merge remote-tracking branch 'public/bug13319'Nick Mathewson
2015-01-28Try to work around changes in openssl 1.1.0Nick Mathewson
Prefer not to use a couple of deprecated functions; include more headers in tortls.c This is part of ticket 14188.
2015-01-10Fix tortls.c build with GCC<4.6Nick Mathewson
apparantly, "pragma GCC diagnostic push/pop" don't exist with older versions. Fixes bug in 740e592790f570c446cbb5e6d4a77f842f75; bug not in any released Tor.