summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2018-06-17Merge remote-tracking branch 'ffmancera-1/bug24658-dh_stream'Nick Mathewson
2018-06-17Merge remote-tracking branch 'rl1987/bug26282'Nick Mathewson
2018-06-13Merge remote-tracking branch 'rl1987/bug24891'Nick Mathewson
2018-06-12Merge branch 'maint-0.3.3'Nick Mathewson
2018-06-12Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-12Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-04Avoid casting smartlist index implicitlyrl1987
2018-06-02Silence unused-const-variable warnings in zstd.h on some gcc versionsteor
Fixes bug 26272; bugfix on 0.3.1.1-alpha.
2018-06-02Heed --disable-unittests properlyrl1987
2018-05-30Fix various typosNick Mathewson
2018-05-24Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-24Merge branch 'maint-0.2.9' into maint-0.3.1Nick 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-18Refactor crypto.[ch] into smaller HKDF module.Fernando Fernandez Mancera
Add two new files (crypto_hkdf.c, crypto_hkdf.h) as new module of crypto.[ch]. This new module includes all functions and dependencies related to HKDF operations. Those have been removed from crypto.[ch]. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
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-08Make dh_param_* stuff static again.Fernando Fernandez Mancera
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-05-08Include crypto_dh.h in order to solve dependency issues.Fernando Fernandez Mancera
Included crypto_dh.h in some files in order to solve DH module dependency issues. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-05-08Refactor crypto.[ch] into smaller DH module.Fernando Fernandez Mancera
Add two new files (crypto_dh.c, crypto_dh.h) as new module of crypto.[ch]. This new module includes all functions and dependencies related to DH operations. Those have been removed from crypto.[ch]. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-05-08Add crypto_log_errors() to crypto_util.[ch]Fernando Fernandez Mancera
crypto_log_errors() has been moved to crypto_util.[ch]. It was duplicated in some files so they have been removed too. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
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.2.9' into maint-0.3.1Nick Mathewson
2018-04-23Merge branch 'maint-0.3.3'Nick 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