summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2019-05-07Merge branch 'tor-github/pr/994'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-03Merge branch 'tor-github/pr/954'David Goulet
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-30Use safe_mem_is_zero in a few more places.Nick Mathewson
I don't believe any of these represent a real timing vulnerability (remote timing against memcmp() on a modern CPU is not easy), but these are the ones where I believe we should be more careful.
2019-04-30Rename tor_mem_is_zero to fast_mem_is_zero()Nick Mathewson
For memeq and friends, "tor_" indicates constant-time and "fast_" indicates optimized. I'm fine with leaving the constant-time "safe_mem_is_zero" with its current name, but the "tor_" prefix on the current optimized version is misleading. Also, make the tor_digest*_is_zero() uniformly constant-time, and add a fast_digest*_is_zero() version to use as needed. A later commit in this branch will fix all the users of tor_mem_is_zero(). Closes ticket 30309.
2019-04-30Merge branch 'tor-github/pr/936'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/980'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Merge branch 'tor-github/pr/909'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Add improved debugging support to crypto_rand_fast code.Nick Mathewson
2019-04-30Extract add-entropy code from crypto_fast_rng to a new functionNick Mathewson
2019-04-25Add rudimentary qstring support to kvline.cNick Mathewson
2019-04-25Move and rename decode_escaped_string()Nick Mathewson
This function decodes something different from the usual c-escaped format. It is only used in controller authorization.
2019-04-25Add a case-insensitive variant to config_line_find()Nick Mathewson
2019-04-25kvline: handle empty alues as well as empty keysNick Mathewson
The two options are mutually exclusive, since otherwise an entry like "Foo" would be ambiguous. We want to have the ability to treat entries like this as keys, though, since some controller commands interpret them as flags.
2019-04-25Merge branch 'tor-github/pr/953'George Kadianakis
2019-04-24Merge branch 'tor-github/pr/951'David Goulet
2019-04-24Merge branch 'tor-github/pr/955'David Goulet
2019-04-18Merge branch 'tor-github/pr/938'George Kadianakis
2019-04-18Merge branch 'maint-0.4.0'George Kadianakis
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-15Clear memory in smartlist_remove_keeporder.Tobias Stoeckmann
The smartlist functions take great care to reset unused pointers inside the smartlist memory to NULL. The function smartlist_remove_keeporder does not clear memory in such way when elements have been removed. Therefore call memset after the for-loop that removes elements. If no element is removed, it is effectively a no-op. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-04-15Fix assertf() issues when ALL_BUGS_ARE_FATAL is defined.Nick Mathewson
Fix from Gisle Vanem; fixes bug 30179. Bug not in any released version of Tor.
2019-04-15Merge branch 'bug30189_035' into bug30189_041Nick Mathewson
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-12Merge branch 'tor-github/pr/908'George Kadianakis
2019-04-12Merge branch 'tor-github/pr/754'George Kadianakis
2019-04-12crypt_ops: Stop using a separate buffer in ed25519_signature_from_base64()teor
Part of 29960.
2019-04-11Remove an extraneous _ from __COVERITY__Nick Mathewson
We had a typo in this check, so that coverity wasn't taking the right path. Bug not in any released Tor.
2019-04-11Don't leak on logic error in string_is_valid_nonrfc_hostname()Nick Mathewson
This is CID 1437438. No backport needed: this is unreachable, and guarded with a BUG() check.
2019-04-10Merge branch 'maint-0.4.0'teor
2019-04-10Merge remote-tracking branch 'tor-github/pr/920' into maint-0.4.0teor
2019-04-06Merge branch 'maint-0.4.0'teor
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 'maint-0.4.0'George Kadianakis
2019-04-05Merge branch 'tor-github/pr/902' into maint-0.4.0George Kadianakis
2019-04-05Merge branch 'tor-github/pr/761'George Kadianakis
2019-04-05binascii: Fix the base64_encode_nopad() buffer length requirementteor
Comment-only change. Part of 29660.
2019-04-05crypto_format: Stop adding padding in ed25519_signature_from_base64()teor
base64_decode() does not require padding. Part of 29660.
2019-04-05crypto_format: Remove the return value from ed25519_signature_to_base64()teor
Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return value from curve25519_public_to_base64()teor
And fix the documentation on the function: it does produce trailing "="s as padding. Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-04-05crypto_format: Remove unused return value from digest_to_base64()teor
Part of 29660.
2019-04-05crypto_format: Remove outdated commentsteor
(These functions look pretty unified to me.) Part of 29660.
2019-04-04Merge remote-tracking branch 'tor-github/pr/752'Nick Mathewson
2019-04-04Use an enum for inherit_result_out.Nick Mathewson
2019-04-04rename inherit values to avoid conflict with system definesNick Mathewson