summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2018-05-30Fix various typosNick Mathewson
2018-05-24Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-22Add a missing include to get the declaration of OPENSSL_1_1_APINick Mathewson
Apparently, even though I had tested on OpenSSL 1.1.1 with no-deprecated, OpenSSL 1.1.0 is different enough that I should have tested with that as well. Fixes bug 26156; bugfix on 0.3.4.1-alpha where we first declared support for this configuration.
2018-05-16Merge branch 'bug26116_029' into bug26116_033Nick Mathewson
2018-05-16Return -1 from our PEM password callbackNick Mathewson
Apparently, contrary to its documentation, this is how OpenSSL now wants us to report an error. Fixes bug 26116; bugfix on 0.2.5.16.
2018-05-11Properly ignore retval of event_del().George Kadianakis
Fixes #26078: CID 1435546.
2018-05-10Remove a workaround for ancient libevent versions.Nick Mathewson
Libevent has accepted a const timeval argument to event_add() for a very long time now.
2018-05-10Add functions to enable/disable periodic_event_t objects.Nick Mathewson
2018-05-09Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-09Merge remote-tracking branch 'public/bug26005_034'Nick Mathewson
2018-05-08rust: Add crypto crate and implement Rust wrappers for SHA2 code.Isis Lovecruft
* FIXES #24659: https://bugs.torproject.org/24659
2018-05-07Restore sys/random.h inclusion for getentropy()Taylor Yu
Code movement for the refactoring for ticket 24658 didn't copy the inclusion of sys/random.h, which is needed to get a prototype for getentropy() on macOS 10.12 Sierra. It also didn't copy the inclusion of sys/syscall.h, which might prevent the getrandom() syscall from being properly detected. Move these inclusions. Bug not in any released Tor.
2018-05-03Move some includes around to try to fix windows buildsNick Mathewson
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-05-03Use OPENSSL_1_1_API in place of raw OPENSSL_VERSION_NUMBER checksNick Mathewson
This is needed for libressl-2.6.4 compatibility, which we broke when we merged a15b2c57e1f901c53 to fix bug 19981. Fixes bug 26005; bug not in any released Tor.
2018-05-03Merge remote-tracking branch 'github/ticket25951'Nick Mathewson
2018-05-02Merge branch 'libressl_201805_029' into maint-0.3.3Nick Mathewson
2018-05-02LibreSSL compatibility fixes.Nick Mathewson
LibreSSL, despite not having the OpenSSL 1.1 API, does define OPENSSL_VERSION in crypto.h. Additionally, it apparently annotates some functions as returning NULL, so that our unit tests need to be more careful about checking for NULL so they don't get compilation warnings. Closes ticket 26006.
2018-05-02Bug 26000: Fix missing ";"Georg Koppen
2018-05-01Merge remote-tracking branch 'github/eliminate_gettimeofday_cached'Nick Mathewson
2018-05-01Add a mechanism for the logging system to report queued callbacksNick Mathewson
Sometimes the logging system will queue a log message for later. When it does this, the callback will either get flushed at the next safe time, or from the second-elapsed callback. But we're trying to eliminate the second-elapsed callback, so let's make a way for the log system to tell its users about this.
2018-04-30Merge remote-tracking branch 'github/ticket19429_034'Nick Mathewson
2018-04-27Move stdbool include to torint.hNick Mathewson
It's friday, and this seems like a good idea, and they're egging me on in IRC.
2018-04-27Only define X509_get_not{BeforeAfter} if they are not definedNick Mathewson
(The originally submitted version of a15b2c57e1f901c531 broke with OpenSSL 1.1.0.)
2018-04-26Add a function to compute millisecond time difference quickly.Nick Mathewson
Our main function, though accurate on all platforms, can be very slow on 32-bit hosts. This one is faster on all 32-bit hosts, and accurate everywhere except apple, where it will typically be off by 1%. But since 32-bit apple is a relic anyway, I think we should be fine.
2018-04-26Remove the "cached gettimeofday" logic.Nick Mathewson
Previously were using this value to have a cheap highish-resolution timer. But we were only using it in one place, and current dogma is to use monotime_coarse_t for this kind of thing.
2018-04-23Merge remote-tracking branch 'github/lazy_bucket_refill'Nick Mathewson
2018-04-23Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-23Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-23Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-23Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-23Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-23Permit the nanosleep system call in the seccomp2 callboxNick Mathewson
Fixes bug 24969; bugfix on 0.2.5.1-alpha when the sandbox was introduced.
2018-04-23Merge remote-tracking branch 'neel/b25511-r4'Nick Mathewson
2018-04-22Merge branch 'ticket25024_squashed'Nick Mathewson
2018-04-22add changes file and update check-typos in makefileDeepesh Pathak
2018-04-22Merge remote-tracking branch 'mikeperry/bug25400_squashed'Nick Mathewson
2018-04-18crypto: Move declaration of crypto_init_siphash_key() into crypto.h.Isis Lovecruft
On second thought, this is a global initialisation function and doesn't conceptually have much to do with getting/using randomnesses.
2018-04-18Add support for openssl built with "no-deprecated".Nick Mathewson
Patch from Andrew John Hughes; partial fix for 19981.
2018-04-17Amend token_bucket_rw_dec to indicate which buckets became empty.Nick Mathewson
2018-04-17token bucket: Add parens to rate_per_sec_to_rate_per_step()Nick Mathewson
Typecasts bind more tightly than division, so we need to do the division first.
2018-04-17Merge remote-tracking branch 'public/bug24688'Nick Mathewson
2018-04-16Make tor_gettimeofday() mockableNeel Chauhan
2018-04-16Add format_local_iso_time_nospace()Neel Chauhan
2018-04-16Helper function to add u32 without overflow.Mike Perry
2018-04-16token: Fix uint32_t to uint64_t conversionDavid Goulet
Unfortunately, the units passed to monotime_coarse_stamp_units_to_approx_msec() was always 0 due to a type conversion. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-16Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-16Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-16Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-16Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson