aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2018-02-01Merge branch 'bug24658-rsa_squashed'Nick Mathewson
2018-02-01Add crypto_rsa.[ch] to include.amFernando Fernandez Mancera
Included crypto_rsa.[ch] into include.am in order to resolve a compiling issue. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-02-01Tweaks into functions and variables in crypto_rsa.[ch]Fernando Fernandez Mancera
crypto_get_rsa_padding_overhead() and crypto_get_rsa_padding() are not static inline anymore in order to split the crypto_rsa module from crypto.[ch]. Also included necessary modules in order to solve dependency issues. Also made two functions in crypto.c use crypto_pk_asn1_encdoe() instead of reaching into the crypto_pk_t struct.
2018-02-01Remove commented functions in crypto module.Fernando Fernandez Mancera
OpenSSL never uses these callbacks anymore so the code is disabled. Fixes #25097. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-02-01Revert "Change the sandbox behavior on all failed opens() to EACCES"Nick Mathewson
This reverts commit 9a06282546418b2e9d21559d4853bcf124b953f4. It appears that I misunderstood how the seccomp2 filter rules interact. It appears that `SCMP_ACT_ERRNO()` always takes precedence over `SCMP_ACT_ALLOW()` -- I had thought instead that earlier rules would override later ones. But this change caused bug 25115 (not in any released Tor).
2018-01-31Merge remote-tracking branch 'public/bug16106_02_nm'Nick Mathewson
2018-01-30Merge branch 'ticket24902_029_05' into ticket24902_033_02David Goulet
2018-01-30dos: Initial code of Denial of Service mitigationDavid Goulet
This commit introduces the src/or/dos.{c|h} files that contains the code for the Denial of Service mitigation subsystem. It currently contains basic functions to initialize and free the subsystem. They are used at this commit. The torrc options and consensus parameters are defined at this commit and getters are implemented. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-26Change the sandbox behavior on all failed opens() to EACCESNick Mathewson
Previously, most disallowed open(O_RDONLY) attempts would EACCES, but others would fail with a crash.
2018-01-26Refactor crypto.[ch] into smaller RSA module.Fernando Fernandez Mancera
Add two new files (crypto_rsa.c, crypto_rsa.h) as new module of crypto.[ch]. This new module includes all functions and dependencies related to RSA operations. Those have been removed from crypto.[ch]. All new changes related to RSA operations must be done in these files. Follows #24658 Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-01-23Add missing static keywordsTaylor Yu
crypto_openssl_header_version_str and crypto_openssl_version_str in crypto_openssl_mgt.c should be static.
2018-01-23openssl_mutexes code belongs in openssl_mgt.cNick Mathewson
2018-01-23add a missing "compat_openssl.h"Nick Mathewson
2018-01-23perhaps this was the missing include?Nick Mathewson
2018-01-23Add a missing include for openssl 1.0.2Nick Mathewson
2018-01-23Merge remote-tracking branch 'ffmancera/bug24658-openssl'Nick Mathewson
2018-01-22Move the openssl namespace back into .c files.Fernando Fernandez Mancera
As we're trying not to have all the other modules in Tor, we moved the openssl namespace includes back into crypto.c and crypto_openssl_mgt.c files. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-01-19Add crypto_openssl_mgt.[ch] for compiling dependencies.Fernando Fernandez Mancera
Included crypto_openssl_mgt.[ch] into the appropiate files in order to resolve compiling and dependencies issues. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-19Tweaks into functions and variables in crypto_openssl_mgt.[ch]Fernando Fernandez Mancera
Renamed free_openssl() to crypto_openssl_free_all(). Also we made variables and functions static again. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-19Don't call Libevent's event_base_free() on NULL.Nick Mathewson
It doesn't crash, but it produces a warning. Fixes bug 24933; bugfix on 322abc030e53c7e84ca9f22a47b2965f2. Bug not in any released Tor.
2018-01-18Rename crypto_openssl.[ch] to crypto_openssl_mgt.[ch]Fernando Fernandez Mancera
Rename crypto_openssl.[ch] to crypto_openssl_mgt.[ch] because it is possible we need crypto_openssl.[ch] in the future. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-17Merge branch 'bug22798_029_squashed'Nick Mathewson
2018-01-17Improve Windows performance with SIO_IDEAL_SEND_BACKLOG_QUERY.Nick Mathewson
Patch written by "Vort" on trac. Addresses ticket 22798.
2018-01-17Merge branch 'bug21074_029'Nick Mathewson
2018-01-17Add a cast to avoid a signed/unsigned comparisonNick Mathewson
2018-01-16Merge branch 'bug21074_029'Nick Mathewson
2018-01-12Merge remote-tracking branch 'ffmancera/bug24861'Nick Mathewson
2018-01-12Fix minGW compatibility issue with zu format specifier.Fernando Fernandez Mancera
Define TOR_PRIuSZ as minGW compiler doesn't support zu format specifier for size_t type. Fixes #24861 on ac9eebd. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-11On shutdown, mark openssl as uninitialized.Nick Mathewson
This causes openssl to get completely reinitialized on startup, which is probably a good idea.
2018-01-11Merge branch 'restart_nocrash'Nick Mathewson
2018-01-10Merge branch 'bug24733_squashed_2'Nick Mathewson
2018-01-10Document the alignment limitation of tor_free()Nick Mathewson
2018-01-10Extract the raw_free() of ifc_buf into a new function.Nick Mathewson
Explain the problem more correctly.
2018-01-10Stop invoking undefined behaviour by using tor_free() on an unaligned pointerteor
... in get_interface_addresses_ioctl(). This pointer alignment issue exists on x86_64 macOS, but is unlikely to exist elsewhere. (i386 macOS only requires 4-byte alignment, and other OSs have 8-byte ints.) Fixes bug 24733; not in any released version of tor.
2018-01-08Add free_openssl() to crypto_openssl module.Fernando Fernandez Mancera
Add free_openssl() function to free the memory allocated for OpenSSL version management variables. It is required since OpenSSL management has been isolated from the crypto module. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-08Refactor crypto.[ch] into smaller OpenSSL module.Fernando Fernandez Mancera
Add two new files (crypto_openssl.c, crypto_openssl.h) as new module of crypto.[ch]. This new module includes all functions and dependencies related to OpenSSL management. Those have been removed from crypto.[ch]. All new changes related to OpenSSL management must be done in these files. Follows #24658 Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2018-01-05Merge branch 'maint-0.3.2'Roger Dingledine
2018-01-05remove redundant "implement this" from log messageRoger Dingledine
2018-01-04Don't treat a setrlimit failure as fatal.Nick Mathewson
Fixes bug 21074; bugfix on 4689243242e2e12 in 0.0.9rc5 when we started doing setrlimit() in the first place.
2017-12-20type error fix for monotime_coarse_add_msec on windowsNick Mathewson
2017-12-20Merge branch 'maint-0.3.2'Nick Mathewson
2017-12-13Another attempt at fixing the STACK warning in tortls.cNick Mathewson
Patch suggestion from catalyst. Related to 24423
2017-12-13Add a function to add msec to a monotime.Nick Mathewson
We'll use this for the channel padding logic.
2017-12-13Add monotime functions for clearing monotonic timesNick Mathewson
We need this to replace some of our "msec" users with monotime users.
2017-12-12Merge branch 'maint-0.3.2'Nick Mathewson
2017-12-12Make sandbox.c compile when libseccomp-dev is installed on arm64Nick Mathewson
Fixes ticket 24424. Patch from weasel.
2017-12-12Fix compilation: logfile_is_external() must accept const*Nick Mathewson
2017-12-12Merge remote-tracking branch 'ahf-oniongit/bugs/24362'Nick Mathewson
2017-12-12Simplify explicit conditional checks into an inlined function.Alexander Færøy
This patch lifts the check for whether a given log file (`logfile_t`) is an "external logfile" (handled by an external logging system such as syslog, android's logging subsystem, or as an external C callback function) into a function on its own. See: https://bugs.torproject.org/24362
2017-12-11Merge branch 'maint-0.3.2'Nick Mathewson