summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2019-08-12Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/1049' into maint-0.4.0teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/952' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/951' into maint-0.3.5teor
2019-08-12Merge remote-tracking branch 'tor-github/pr/911' into maint-0.3.5teor
2019-08-10Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-08-09Merge remote-tracking branch 'tor-github/pr/1054' into maint-0.3.5teor
2019-08-09Merge remote-tracking branch 'tor-github/pr/920' into maint-0.3.5teor
2019-08-09Merge remote-tracking branch 'tor-github/pr/763' into maint-0.3.5teor
2019-08-09Merge branch 'bug31343_31374_035' into bug31343_31374_040teor
2019-08-08Merge branch 'ticket31374_029' into ticket31374_035Nick Mathewson
2019-06-05Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0Nick Mathewson
2019-05-29Merge branch 'ticket30561_029' into ticket30561_035Nick Mathewson
2019-05-29Use MAP_INHERIT_ZERO or MAP_INHERIT_NONE if available.Taylor R Campbell
Fixes assertion failure in tests on NetBSD: slow/prob_distr/stochastic_log_logistic: [forking] May 25 03:56:58.091 [err] tor_assertion_failed_(): Bug: src/lib/crypt_ops/crypto_rand_fast.c:184: crypto_fast_rng_new_from_seed: Assertion inherit != INHERIT_RES_KEEP failed; aborting. (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) May 25 03:56:58.091 [err] Bug: Assertion inherit != INHERIT_RES_KEEP failed in crypto_fast_rng_new_from_seed at src/lib/crypt_ops/crypto_rand_fast.c:184: . (Stack trace not available) (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) [Lost connection!]
2019-04-18Merge branch 'tor-github/pr/891' into maint-0.4.0George Kadianakis
2019-04-17Do not warn about compatible OpenSSL upgradesBernhard M. Wiedemann
When releasing OpenSSL patch-level maintenance updates, we do not want to rebuild binaries using it. And since they guarantee ABI stability, we do not have to. Without this patch, warning messages were produced that confused users: https://bugzilla.opensuse.org/show_bug.cgi?id=1129411 Fixes bug 30190; bugfix on 0.2.4.2-alpha commit 7607ad2bec Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2019-04-15Use a tor_abort_() wrapper in our util_bug.h macrosNick Mathewson
Previously, our use of abort() would break anywhere that we didn't include stdlib.h. This was especially troublesome in case where tor_assert_nonfatal() was used with ALL_BUGS_ARE_FATAL, since that one seldom gets tested. As an alternative, we could have just made this header include stdlib.h. But that seems bloaty. Fixes bug 30189; bugfix on 0.3.4.1-alpha.
2019-04-10Merge remote-tracking branch 'tor-github/pr/920' into maint-0.4.0teor
2019-04-06Merge remote-tracking branch 'tor-github/pr/911' into maint-0.4.0teor
2019-04-06NSS: disable TLS1.2 SHA-384 ciphersuites.Nick Mathewson
In current NSS versions, these ciphersuites don't work with SSL_ExportKeyingMaterial(), which was causing relays to fail when they tried to negotiate the v3 link protocol authentication. Fixes bug 29241; bugfix on 0.4.0.1-alpha.
2019-04-06NSS: Log an error message when SSL_ExportKeyingMaterial() failsNick Mathewson
Diagnostic for 29241.
2019-04-05Merge branch 'tor-github/pr/902' into maint-0.4.0George Kadianakis
2019-04-04Merge branch 'bug30021_029' into bug30021_035Nick Mathewson
2019-04-03fdio.c: add more includes.Nick Mathewson
This is just in case there is some rogue platform that uses a nonstandard value for SEEK_*, and does not define that macro in unistd.h. I think that's unlikely, but it's conceivable.
2019-03-25Pass NULL to lpApplicationName in CreateProcessA().Alexander Færøy
When NULL is given to lpApplicationName we enable Windows' "magical" path interpretation logic, which makes Tor 0.4.x behave in the same way as previous Tor versions did when it comes to executing binaries in different system paths. For more information about this have a look at the CreateProcessA() documentation on MSDN -- especially the string interpretation example is useful to understand this issue. This bug was introduced in commit bfb94dd2ca8. See: https://bugs.torproject.org/29874
2019-03-12Merge branch 'tor-github/pr/763' into maint-0.4.0George Kadianakis
2019-03-08Merge remote-tracking branch 'bug28525_029' into maint-0.3.5teor
2019-03-04doc: Fix an incorrect comment about calling FreeLibrary() on Windowsteor
There's an incorrect comment in compat_time.c that suggests we call FreeLibrary() before we're done using the library's functions. See 29642 for background. Closes ticket 29643.
2019-02-14Merge branch 'tor-github/pr/702'David Goulet
2019-02-14Merge branch 'maint-0.3.5'George Kadianakis
2019-02-14Merge branch 'tor-github/pr/689' into maint-0.3.5George Kadianakis
2019-02-14Implement a fast aes-ctr prngNick Mathewson
This module is currently implemented to use the same technique as libottery (later used by the bsds' arc4random replacement), using AES-CTR-256 as its underlying stream cipher. It's backtracking- resistant immediately after each call, and prediction-resistant after a while. Here's how it works: We generate psuedorandom bytes using AES-CTR-256. We generate BUFLEN bytes at a time. When we do this, we keep the first SEED_LEN bytes as the key and the IV for our next invocation of AES_CTR, and yield the remaining BUFLEN - SEED_LEN bytes to the user as they invoke the PRNG. As we yield bytes to the user, we clear them from the buffer. Every RESEED_AFTER times we refill the buffer, we mix in an additional SEED_LEN bytes from our strong PRNG into the seed. If the user ever asks for a huge number of bytes at once, we pull SEED_LEN bytes from the PRNG and use them with our stream cipher to fill the user's request.
2019-02-14Extract the common body of our random-int functions into a macroNick Mathewson
This is the second part of refactoring the random-int-in-range code.
2019-02-13Merge branch 'tor-github/pr/651'David Goulet
2019-02-13Merge branch 'tor-github/pr/650' into maint-0.3.5David Goulet
2019-02-08Add more openssl includes to fix no-deprecated compilationNick Mathewson
Closes ticket 29026; patch from Mangix.
2019-02-08Fix compilation when openssl is compiled without engine support.Nick Mathewson
Patch from Mangix. Closes part of ticket 29026.
2019-02-06Extract numeric CSPRNG functions into a new module.Nick Mathewson
Some of the code for getting a random value within a range wants to be shared between crypto_rand() and the new crypto_fast_rng() code.
2019-02-06Remove extraneous #if/#endif wrapper in crypto_rand.cNick Mathewson
I don't know how this got here, but this kind of a wrapper only belongs in a header file.
2019-02-06Code for anonymous mappings via mmap() or CreateFileMapping().Nick Mathewson
Using an anonymous mmap() is a good way to get pages that we can set kernel-level flags on, like minherit() or madvise() or mlock(). We're going to use that so that we can make uninheritable locked pages to store PRNG data.
2019-01-23Merge branch 'ticket28668_035' into ticket28668_040Nick Mathewson
2019-01-23Capture more BUG warnings in util/time testNick Mathewson
These are ones that happen on windows only. Fixes bug 29161.
2019-01-22Allow getsockopt(…, SOL_SOCKET, SO_ACCEPTCONN, …) in sandboxPeter Gerber
SO_ACCEPTCONN checks whether socket listening is enabled and is used ever since 9369152aae9527cc3764 has been merged. Closes ticket #29150
2019-01-22Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-22Merge branch 'bug29042_035' into maint-0.3.5Nick Mathewson
2019-01-16Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-16Update and fix a couple of comments in meminfo.cKris Katterjohn
This fixes a typo and also notes that HW_PHYSMEM64 is defined on NetBSD (not just OpenBSD). Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-16Use HW_PHYSMEM instead of HW_USERMEM in get_total_system_memory_implKris Katterjohn
The code checked for sysctl being available and HW_PHYSMEM being defined, but HW_USERMEM was actually being used with sysctl instead of HW_PHYSMEM. The case for OpenBSD, etc. use HW_PHYSMEM64 (which is obviously a 64-bit variant of HW_PHYSMEM) and the case for OSX uses HW_MEMSIZE (which appears to be a 64-bit variant of HW_PHYSMEM). Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-16Log more messages when failing to decode RSA keysNick Mathewson
We log these messages at INFO level, except when we are reading a private key from a file, in which case we log at WARN. This fixes a regression from when we re-wrote our PEM code to be generic between nss and openssl. Fixes bug 29042, bugfix on 0.3.5.1-alpha.
2019-01-16Bump copyright date to 2019Nick Mathewson