Yat Ho
1e14cc605b
refactor: migrate to Madler's crc32c ( #8475 )
2026-02-15 15:16:01 -06:00
Charles Kerr
cbaefab599
refactor: add libtransmission/types.h ( #8449 )
...
refactor: add libtransission/constants.h
2026-02-11 16:52:29 -06:00
Yat Ho
9dd9aab902
build: bump clang tools to 20 ( #7573 )
...
* build: bump to clang-format-20
* build: bump to clang-tidy-20
* chore: revert edc59ba5d8
2025-12-01 23:18:02 -06:00
Yat Ho
bfb5e35021
chore: add suffix to private and protected members ( #7746 )
2025-10-30 10:13:27 -05:00
Yat Ho
0715897fc8
feat: use canonical peer priority to decide which peers to keep ( #6981 )
...
* feat: CRC32-C
* feat: canonical peer priority calculation bep-40
* test: add test cases for IPv4 canonical peer priority
* refactor: compare by canonical priority
* fix: use network byte order for peer ports
* test: more cases
* build: xcode
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com >
* ci: test system crc32c library
---------
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com >
2025-10-25 12:05:20 -05:00
Yat Ho
2005398fcf
fix: include wolfssl library configurations header ( #7632 )
...
The MOST common issue we see is a mis-configuration between APP and Library. If you compile the wolfSSL library independant of your application you MUST include the same configure options in the application as were used in the library.
If building with “./configure” the build system will generate the file <wolf-root>/wolfssl/options.h with all the settings needed for your application.
Source: https://www.wolfssl.com/docs/frequently-asked-questions-faq/#How_do_I_manage_the_build_configuration_for_wolfSSL
2025-10-15 14:18:19 -05:00
Yat Ho
08ec7fb7c7
build: lint header files with clang-tidy ( #7527 )
...
* build: clang-tidy headers when building libtransmission
* chore: revert `= default` workaround
It was introduced in 6909ec0bad to fix build issues with macOS 10.14. We
no longer support that version.
* fix: clang-tidy warnings for libtransmission
* build: clang-tidy headers when building tests
* fix: clang-tidy warnings for tests
* build: clang-tidy headers when building qt
* code review: don't manually edit mime-types.h
* code review: unify variable naming for static private members
2025-05-07 22:10:16 +01:00
Charles Kerr
6132706565
chore: iwyu ( #6864 )
...
* chore: do not include <set> unless we use it
* chore: do not include <map> unless we use it
* chore: do not include <string> unless we use it
* chore: do not include <list> unless we use it
* chore: do not include <memory> unless we use it
* chore: do not include <optional> unless we use it
* chore: do not include <functional> unless we use it
2024-05-27 17:36:02 -05:00
Charles Kerr
50dca24f50
refactor: aggregate crypto handles when computing digests ( #6662 )
...
* refactor: aggregate per-crypto-pkg fields instead of using inheritance
2024-03-04 16:59:51 -06:00
Julien
8ac323d5d6
chore: removed copyright timespans in headers ( #4850 )
2023-11-01 16:11:11 -05:00
tearfur
5ec4ca550e
chore: iwyu ( #5746 )
2023-07-08 10:24:03 -05:00
Charles Kerr
0a6d1806f9
perf: avoid string allocations by using fixed-width hash strings ( #5725 )
2023-07-04 13:04:03 -05:00
Julien
4b8cfa2e57
chore: update copyrights to 2023 ( #4834 )
2023-02-11 14:49:42 -06:00
Charles Kerr
7367d465b5
style: use the new paragraph comment style everywhere ( #4634 )
2023-01-22 13:21:30 -06:00
Charles Kerr
2b90a5fd55
refactor: possible FTBFS fix on arm7 ( #4492 )
...
* refactor: possible FTBFS fix on arm7
* chore: remove tr_rand_int_weak() from crypto-test-ref
* refactor: move tr_rand_int() to header
2022-12-29 10:30:03 -06:00
Charles Kerr
092d411663
refactor: tr_rand_buffer(), tr_rand_int() again ( #4415 )
2022-12-21 09:58:32 -06:00
Charles Kerr
5493ed644e
refactor: use tr_rand_buf() in tr_bandwidth::phaseOne() ( #4404 ) ( #4411 )
2022-12-19 17:31:24 -06:00
A Cœur
a656b3b8c9
fix: tr_rand_int modulo bias and fixed tr_rand_int for values larger than INT_MAX. ( #4235 )
2022-11-30 22:58:14 -06:00
Charles Kerr
8a35aa0903
refactor: add tr_rand_obj() ( #4238 )
...
* refactor: add tr_rand_obj()
There are a lot of places in the codebase where we need to populate
an integral type or a fixed-size array with random data. To do this,
we instantiate a local on the stack, fill it with tr_rand_buffer(),
and then use it.
This PR creates a helper function to make this a one-liner.
2022-11-25 15:04:37 -06:00
Charles Kerr
fed6d180fe
fixup: new coverity warnings ( #3864 )
...
* fixup: memcmp length argument regression
* perf: fix big parameter passed by value
* chore: silence unchecked curl_easy_setopt return value warning
2022-10-02 19:45:38 -05:00
Charles Kerr
c0f29a89ea
refactor: add [[nodiscard]] ( #3793 )
2022-09-08 21:49:51 -05:00
Charles Kerr
e8686095ed
refactor: local peer discovery ( #3696 )
2022-08-24 16:03:30 -05:00
Charles Kerr
785119f2c2
perf: sonarcloud warnings about temp objects ( #3686 )
...
* perf: sonarcloud warnings about unnecessary temporary objects
* refactor: rename tr_sha1_digest_t::final() as finish()
2022-08-20 15:57:32 -05:00
Charles Kerr
29f57bc296
chore: iwyu headers ( #3661 )
2022-08-17 11:08:36 -05:00
Charles Kerr
83ffa6bf1b
chore: fix spdx abbreviations ( #3602 )
2022-08-08 13:05:39 -05:00
Charles Kerr
dab81c1af6
fix: readability-inconsistent-declaration-parameter-name warnings in libtransmission ( #3572 )
2022-08-03 01:15:37 -05:00
Charles Kerr
18e2a04f88
refactor: make sha1, sha256 RAII safe ( #3556 )
2022-07-31 15:58:14 -05:00
Charles Kerr
15056045bd
perf: batch up calls to the RNG ( #3537 )
2022-07-28 10:01:59 -05:00
Charles Kerr
2bcab6be7e
refactor: remove tr_dh code ( #3443 )
...
Refactor the MSE handshake Diffie-Hellman key code.
2022-07-14 19:54:10 -05:00
Colin B
3237323b8e
Add basic support for v2 hashes in transmission-show ( #3380 )
...
* Add basic support for v2 hashes in transmission-show
* Add sha256 for more libraries
* Fix issue with sha256 digest length
* Add sha256 for polarssl
Note: Bumping miniumum PolarSSL version to 1.3 because of
sha2->sha256 name change.
* Add sha256 for CommonCrypto/ccrypto
* Add sha256 for cyassl
2022-07-01 09:49:33 -05:00
Charles Kerr
205abbbcce
refactor: iwyu string, vector, cstdint ( #2898 )
...
* refactor: use cstdint for intX_t types
* refactor: iwyu sstring_view
* refactor: iwyu <cstring>
* refactor: iwyu <vector>
2022-04-07 20:50:26 -05:00
Charles Kerr
46cc95f72e
refactor: remove unused functions ( #2863 )
...
* refactor: annotate nodiscard, constexpr, noexcept methods
* refactor: remove unused tr_blocklistFileExists()
* refactor: remove unused tr_blocklistFileIsEnabled()
* refactor: remove unused tr_ctorGetContents
* refactor: remove unused tr_error_is_set()
* refactor: remove unused tr_handshakeGetAddr()
* refactor: remove unused tr_ctorSetLabels()
* refactor: remove unused tr_http_escape_sha1()
* refactor: remove unused tr_lpdEnabled()
* refactor: remove unused tr_ptrArrayPop()
* refactor: remove unused tr_torrentClearIdleLimitHitCallback()
* refactor: remove unused tr_torrentFindFromHash()
* refactor: remove unused tr_sha1_to_string()
* refactor: remove unused tr_torrents::get()
* refactor: remove unused tr_isEncryptionMode()
* refactor: remove unused tr_isPreallocationMode()
* refactor: remove unused tr_ptrArrayBack()
* refactor: remove unused tr_ptrArrayClear()
* refactor: remove unused tr_torrents::get()
* refactor: remove unused Session::torrentSet()
* refactor: remove unused peer_atom comparison operators
* refactor: remove unused peer_atom::compare()
* refactor: remove unused Qt variantInit(tr_variant*, unsigned)
2022-04-01 21:55:30 -05:00
Charles Kerr
96178b1a9f
feat: add support for adding torrents by raw hash values ( #2608 )
...
* Add support for adding torrents by raw hash values
Co-authored-by: vjunk <vjunk@mail.ru >
2022-02-12 22:16:55 -06:00
Charles Kerr
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
0c16c454ba
refactor: base64 utils ( #2381 )
...
base64 encode/decode now take std::string_views and return std::strings
2022-01-08 06:46:25 -06:00
Charles Kerr
bd68d3a2fd
refactor: use tr_sha1_digest_t everywhere ( #2330 )
2021-12-21 16:14:15 -06:00
Charles Kerr
b9406dfebb
refactor: even more torrent housekeeping ( #2323 )
2021-12-16 22:51:53 -06:00
Charles Kerr
af8e9e66b9
fixup! refactor: rpc-server.cc ( #2152 ) ( #2164 )
...
fixup: rpc-server auth regression; fix tests
2021-11-14 21:54:48 -06:00
Charles Kerr
99aeaa0eaf
refactor: tr_ssha1(), tr_ssha1_matches() ( #2148 )
...
* refactor: make tr_ssha1 and tr_ssha1_matches string_view-friendly
2021-11-13 20:03:01 -06:00
Charles Kerr
bdf1bb6d17
refactor: tr_strv*() util functions ( #2123 )
...
* feat: add tr_strv utils
2021-11-09 18:13:47 -06:00
Charles Kerr
d8b57fe4dc
refactor: web_utils ( #2121 )
...
* chore: move web utils from web, utils to web-utils
2021-11-08 21:30:03 -06:00
Charles Kerr
7724111a8b
refactor: increase use of tr sha1 digest t ( #2091 )
...
* refactor: make tr_sha1_digest_t an array of std::byte
* refactor: increase use of tr_sha1_digest_t
2021-11-03 19:55:04 -05:00
Charles Kerr
cc204e0b2c
refactor: prefer "using" over "typedef" ( #1883 )
...
* refactor: prefer "using" over "typedef"
2021-10-06 09:26:07 -05:00
Charles Kerr
17ee032dd8
refactor: remove TR_BEGIN_DECLS, TR_END_DECLS ( #1837 )
...
* refactor: remove TR_BEGIN_DECLS, TR_END_DECLS
2021-09-25 11:07:22 -05:00
Mike Gelfand
a459e5e11b
Switch to a standalone ARC4 implementation ( #1788 )
...
* Switch to a standalone ARC4 implementation
This frees us from expecting it being provided by one of the crypto
libraries we support, all of which deprecated and/or removed it at this
point.
Fixes : #1103
Fixes : #1777
* Suppress lgtm warnings about RC4 being weak (we don't care)
2021-09-12 06:47:29 +03:00
Mike Gelfand
db3d40d0ed
Switch to clang-format for code formatting, include Mac client
2021-08-16 00:38:29 +03:00
Charles Kerr
677dc73eac
refactor: use GTest for running tests ( #1383 )
...
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Mike Gelfand
f3968b7708
Load CA certs from system store on Windows / OpenSSL
...
Fixes : #446
2019-06-23 11:59:53 +03:00
Mike Gelfand
4f9d9ad92b
Code style change leftovers
...
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand
dadffa2c0f
Align type qualifiers to the right (code style)
...
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00