From 4d0b6c7433f8aa42cfcc54f7923adca1d0015f72 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 21 May 2023 15:32:35 +0200 Subject: [PATCH 01/29] bump 2.0 version to 2.0.9 --- ChangeLog | 2 ++ Jamfile | 2 +- Makefile | 2 +- bindings/python/setup.cfg | 2 +- docs/header.rst | 2 +- docs/hunspell/libtorrent.dic | 2 +- include/libtorrent/version.hpp | 12 ++++++------ src/settings_pack.cpp | 2 +- test/test_settings_pack.cpp | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15c947d473a..4006b7b12bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +2.0.9 released + * fix issue with web seed connections when they close and re-open * fallocate() not supported is not a fatal error * fix proxying of IPv6 connections via IPv4 proxy diff --git a/Jamfile b/Jamfile index a76f368b527..a9e121a3280 100644 --- a/Jamfile +++ b/Jamfile @@ -12,7 +12,7 @@ import cast ; # we need version numbers in the form X.Y.Z in order to trigger the built-in # support for generating symlinks to the installed library -VERSION = 2.0.8 ; +VERSION = 2.0.9 ; BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; CXXFLAGS = [ modules.peek : CXXFLAGS ] ; diff --git a/Makefile b/Makefile index 6007dc2c491..e3f43e88112 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=2.0.8 +VERSION=2.0.9 BUILD_CONFIG=release link=shared crypto=openssl warnings=off address-model=64 diff --git a/bindings/python/setup.cfg b/bindings/python/setup.cfg index d026a7307b9..f95b5b8a28d 100644 --- a/bindings/python/setup.cfg +++ b/bindings/python/setup.cfg @@ -1,5 +1,5 @@ [metadata] -version = 2.0.8 +version = 2.0.9 [build_ext] cxxstd = 14 diff --git a/docs/header.rst b/docs/header.rst index a897ee0dcdd..cdfef908808 100644 --- a/docs/header.rst +++ b/docs/header.rst @@ -1 +1 @@ -:Version: 2.0.8 +:Version: 2.0.9 diff --git a/docs/hunspell/libtorrent.dic b/docs/hunspell/libtorrent.dic index 84b5ff7f9a9..0697d409e68 100644 --- a/docs/hunspell/libtorrent.dic +++ b/docs/hunspell/libtorrent.dic @@ -551,7 +551,7 @@ cpp tos BP qB -LT2080 +LT2090 iocontrol getname getpeername diff --git a/include/libtorrent/version.hpp b/include/libtorrent/version.hpp index 8ba01900f50..cc136f58125 100644 --- a/include/libtorrent/version.hpp +++ b/include/libtorrent/version.hpp @@ -39,27 +39,27 @@ POSSIBILITY OF SUCH DAMAGE. #define LIBTORRENT_VERSION_MAJOR 2 #define LIBTORRENT_VERSION_MINOR 0 -#define LIBTORRENT_VERSION_TINY 8 +#define LIBTORRENT_VERSION_TINY 9 // the format of this version is: MMmmtt // M = Major version, m = minor version, t = tiny version #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTORRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) -#define LIBTORRENT_VERSION "2.0.8.0" -#define LIBTORRENT_REVISION "63e1ec8c8" +#define LIBTORRENT_VERSION "2.0.9.0" +#define LIBTORRENT_REVISION "559e52ca3" namespace libtorrent { // the major, minor and tiny versions of libtorrent constexpr int version_major = 2; constexpr int version_minor = 0; - constexpr int version_tiny = 8; + constexpr int version_tiny = 9; // the libtorrent version in string form - constexpr char const* version_str = "2.0.8.0"; + constexpr char const* version_str = "2.0.9.0"; // the git commit of this libtorrent version - constexpr std::uint64_t version_revision = 0x63e1ec8c8; + constexpr std::uint64_t version_revision = 0x559e52ca3; // returns the libtorrent version as string form in this format: // "..." diff --git a/src/settings_pack.cpp b/src/settings_pack.cpp index 30da751fef6..bf368e3587a 100644 --- a/src/settings_pack.cpp +++ b/src/settings_pack.cpp @@ -148,7 +148,7 @@ constexpr int DISK_WRITE_MODE = settings_pack::enable_os_cache; SET(proxy_username, "", &session_impl::update_proxy), SET(proxy_password, "", &session_impl::update_proxy), SET(i2p_hostname, "", &session_impl::update_i2p_bridge), - SET(peer_fingerprint, "-LT2080-", nullptr), + SET(peer_fingerprint, "-LT2090-", nullptr), SET(dht_bootstrap_nodes, "dht.libtorrent.org:25401", &session_impl::update_dht_bootstrap_nodes) }}); diff --git a/test/test_settings_pack.cpp b/test/test_settings_pack.cpp index 794cb9972a7..36e2c74967d 100644 --- a/test/test_settings_pack.cpp +++ b/test/test_settings_pack.cpp @@ -194,7 +194,7 @@ TORRENT_TEST(clear_single_string) sp.clear(settings_pack::user_agent); // when cleared, we'll get the default value - TEST_EQUAL(sp.get_str(settings_pack::user_agent), "libtorrent/2.0.8.0"); + TEST_EQUAL(sp.get_str(settings_pack::user_agent), "libtorrent/2.0.9.0"); } TORRENT_TEST(duplicates) From 2b6360320b1b1bf3a28b72c9866071b2b155ac21 Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 23 May 2023 09:54:51 +0200 Subject: [PATCH 02/29] don't run win32 tests when building python wheel --- .github/workflows/cibuildwheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index b5b2d925d96..9002aac5cb7 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -88,6 +88,7 @@ jobs: CIBW_BUILD_VERBOSITY: 1 CIBW_BUILD: ${{ matrix.CIBW_BUILD }} CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }} + CIBW_TEST_SKIP: "*-win32" steps: - uses: actions/checkout@v3 From 73089332abae605ac303c9c037049674c4b365ff Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 25 May 2023 08:55:24 +0200 Subject: [PATCH 03/29] fix missing python converter for dht::announce_flags_t --- ChangeLog | 2 ++ bindings/python/src/converters.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4006b7b12bb..57e6810dba9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * fix missing python converter for dht::announce_flags_t + 2.0.9 released * fix issue with web seed connections when they close and re-open diff --git a/bindings/python/src/converters.cpp b/bindings/python/src/converters.cpp index 9c7c2b2170d..d989329d741 100644 --- a/bindings/python/src/converters.cpp +++ b/bindings/python/src/converters.cpp @@ -24,6 +24,7 @@ #include "libtorrent/pex_flags.hpp" #include "libtorrent/string_view.hpp" #include "libtorrent/storage_defs.hpp" +#include "libtorrent/kademlia/announce_flags.hpp" #include "libtorrent/write_resume_data.hpp" #include #include @@ -453,6 +454,7 @@ void bind_converters() to_python_converter>(); to_python_converter>(); to_python_converter>(); + to_python_converter>(); to_python_converter>(); to_python_converter>(); to_python_converter(); @@ -549,6 +551,7 @@ void bind_converters() to_bitfield_flag(); to_bitfield_flag(); to_bitfield_flag(); + to_bitfield_flag(); to_string_view(); to_bitfield_flag(); to_bitfield_flag(); From a43e7f718a667fb1a4a2aaeed9061fcff154e6ba Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 25 May 2023 12:23:54 +0100 Subject: [PATCH 04/29] Bump boost version to enable Python 3.11 package builds Python 3.11 is not compatible with Boost Python <= 1.80 due to error with Py_TPFLAGS_HAVE_GC enum. Ref: https://github.com/boostorg/python/issues/400 Fixes: https://github.com/arvidn/libtorrent/issues/7265 --- .cirrus.yml | 2 +- pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index fe454e9545a..0ca696ec2b8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -45,7 +45,7 @@ build_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true CIBW_SKIP: pp* cp38-* # cp38-* has problem with x86_64 / arm64 confusion - CIBW_BUILD: cp39-* cp310-* # cp311-* can be added after boost-python version >= 1.81 + CIBW_BUILD: cp39-* cp310-* cp311-* CIBW_ARCH: arm64 PATH: /opt/homebrew/bin:$PATH PYTHON: python3.9 diff --git a/pyproject.toml b/pyproject.toml index 689ba9cdcd1..ffae80da36b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires-python = ">=3.7" [tool.cibuildwheel] -skip = "{pp*,cp311-*}" +skip = "{pp*,}" [tool.cibuildwheel.macos] before-all = [ @@ -17,7 +17,7 @@ test-command = [ [tool.cibuildwheel.macos.environment] BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.80.0" +BOOST_VERSION = "1.81.0" MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support PATH = "/tmp/boost:$PATH" @@ -38,7 +38,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.80.0" +BOOST_VERSION = "1.81.0" PATH = "/usr/local/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -57,7 +57,7 @@ test-command = [ [tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" -BOOST_VERSION = "1.76.0" +BOOST_VERSION = "1.81.0" PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] @@ -80,7 +80,7 @@ test-command = '''bash -c "cd '{project}/bindings/python' && python test.py"''' [tool.cibuildwheel.windows.environment] BOOST_BUILD_PATH = 'c:/boost/tools/build' BOOST_ROOT = 'c:/boost' -BOOST_VERSION = "1.80.0" +BOOST_VERSION = "1.81.0" PATH = 'c:/boost;$PATH' [tool.isort] From c2012b084c6654d681720ea0693d87a48bc95b14 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 29 May 2023 19:03:20 +0200 Subject: [PATCH 05/29] cmake: don't define _FILE_OFFSET_BITS on Windows Completes 44da281de200ca97757e7e which removed it in various places, but missed the cmake config. This fixes the build on Windows with mingw-w64. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5477543b6c1..11d119a7c29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -595,11 +595,17 @@ target_compile_definitions(torrent-rasterbar BOOST_ASIO_NO_DEPRECATED PRIVATE TORRENT_BUILDING_LIBRARY - _FILE_OFFSET_BITS=64 BOOST_EXCEPTION_DISABLE BOOST_ASIO_HAS_STD_CHRONO ) +if (NOT WIN32) + target_compile_definitions(torrent-rasterbar + PRIVATE + _FILE_OFFSET_BITS=64 + ) +endif() + target_link_libraries(torrent-rasterbar PUBLIC Threads::Threads From 9e750fa004949581ee1826466023741fc4074513 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 3 Jul 2023 13:48:48 +0200 Subject: [PATCH 06/29] update SSL certificates for tests --- test/ssl/dhparams.pem | 22 ++-- test/ssl/invalid_peer_certificate.pem | 117 +++++++++--------- test/ssl/invalid_peer_private_key.pem | 56 ++++----- test/ssl/peer_certificate.pem | 110 ++++++++--------- test/ssl/peer_private_key.pem | 56 ++++----- test/ssl/regenerate_test_certificate.sh | 4 +- test/ssl/root_ca_cert.pem | 110 ++++++++--------- test/ssl/root_ca_private.pem | 56 ++++----- test/ssl/server.pem | 155 ++++++++++++------------ 9 files changed, 344 insertions(+), 342 deletions(-) diff --git a/test/ssl/dhparams.pem b/test/ssl/dhparams.pem index c2424ebbc98..e806efe47a4 100644 --- a/test/ssl/dhparams.pem +++ b/test/ssl/dhparams.pem @@ -1,13 +1,13 @@ -----BEGIN DH PARAMETERS----- -MIICCAKCAgEAgUUnkLfIClLl/0PxqGuLytphYV+h7Z8FroJqY5RQrKVH7dFFfLVT -IKDd75w3ShN/CBAIl/V6s7knqks6R0ll8QLUZYsWhyidvMFBKtZE0x+wsXkTtNhI -1MawUU7OdDQabZyOHxI0H6uCkmUCRB7RMkxk42jkDyNoF/8dHR2mysRT/n6bnW8M -Bsqm7cI4LdacPuFXNNkyWkp1WufPlVAZR7SfqA7BGANN5ECUZG6oJiL38GdPBfYo -gCW1FPVCZ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5m +QErBNFVyGHaWC+Fs3vrqtkoafPeNy4OXXyWQQo2bfwB02ubqUZzLT6cCAQI= -----END DH PARAMETERS----- diff --git a/test/ssl/invalid_peer_certificate.pem b/test/ssl/invalid_peer_certificate.pem index 72ec2238597..d852a1afd56 100644 --- a/test/ssl/invalid_peer_certificate.pem +++ b/test/ssl/invalid_peer_certificate.pem @@ -2,81 +2,78 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - 53:ec:a5:6d:e0:33:0b:3f:1b:64:64:9f:8c:a2:65:7e:c1:9b:c5:ca + 43:6f:28:43:34:d0:47:6c:74:fa:23:42:47:b0:af:13:73:0e:1b:13 Signature Algorithm: sha256WithRSAEncryption Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=test Validity - Not Before: Jun 12 13:35:50 2021 GMT - Not After : Jun 12 13:35:50 2022 GMT + Not Before: Jun 14 10:54:46 2022 GMT + Not After : Jun 14 10:54:46 2023 GMT Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=* Subject Public Key Info: Public Key Algorithm: rsaEncryption - RSA Public-Key: (2048 bit) + Public-Key: (2048 bit) Modulus: - 00:d2:50:62:10:8e:4b:e9:fa:74:e7:53:97:ea:25: - b1:26:53:5a:ed:f6:a6:72:5e:9a:0f:8a:09:e2:b2: - dd:f9:bc:10:b1:de:9a:bd:e6:64:d9:0f:c1:b3:ed: - 42:d8:f7:9f:52:f6:49:38:1d:5d:f9:cc:8c:7e:c8: - ef:8e:f7:e8:e1:7c:9c:13:e1:32:72:a7:b9:df:68: - 1f:9d:88:82:09:4c:e0:7c:bb:9c:74:bf:9d:51:57: - f3:94:f8:80:d4:80:5f:ee:1c:98:a5:43:08:25:42: - b2:9b:1b:2a:2a:13:86:80:68:f8:ea:5d:d1:d7:50: - 9f:35:49:f9:9c:0b:a8:17:23:b1:b9:26:6c:32:00: - 82:3c:51:f2:bb:c6:1a:3d:5e:14:ce:1d:b4:b9:98: - cb:54:3a:21:f5:d1:40:75:c5:05:86:3b:ed:7e:87: - 79:ba:74:56:46:65:48:41:d0:9e:23:7b:dd:c7:b4: - c0:df:36:c8:01:03:b6:96:03:27:bd:6c:8e:64:33: - 5a:f8:dd:49:7f:c2:d1:d2:a8:c7:3f:5e:63:78:28: - 3b:d4:c4:87:fe:13:16:96:f4:89:81:c0:fc:98:8a: - 54:8a:14:21:7f:7b:21:fc:f5:c8:37:0e:94:6b:a2: - a5:53:7e:13:27:cf:6b:a5:0b:f8:f4:53:fa:5e:6d: - d3:25 + 00:cf:e5:ad:21:34:68:44:4c:ee:da:3e:ca:91:55: + e9:cf:fc:c9:04:bd:ff:25:47:e4:5e:72:76:a9:3c: + b0:76:48:d7:7d:f9:2c:80:31:d3:bf:36:86:cd:14: + 8f:bf:ff:10:3d:48:0f:4c:f2:5c:29:27:73:7b:c9: + fe:a1:2d:cd:45:16:9c:ea:ef:10:28:86:81:f0:5b: + db:19:a1:e0:45:ca:0e:c9:a9:dd:18:0d:1a:45:78: + 40:17:01:5a:e7:da:fb:31:38:94:6e:25:0a:70:0a: + 11:3d:91:e1:ea:f7:15:75:11:8b:5d:c3:51:d4:91: + ee:94:ab:0f:a5:a6:66:0e:10:30:bb:60:55:60:c2: + 51:80:b7:58:b2:80:96:bf:23:36:f6:8c:0c:8b:63: + 10:47:2f:7c:89:b2:c3:e3:4e:c2:72:74:85:ef:60: + 8c:ac:54:58:2c:bb:17:98:61:60:ad:43:38:a3:f3: + 22:2a:4c:a6:42:8e:c1:f9:1c:06:21:c7:24:bf:91: + 09:bf:64:87:ee:9d:17:aa:03:41:cd:b2:eb:4e:df: + f5:e8:6a:c6:96:b2:d3:a5:96:ab:16:4f:04:31:46: + 03:75:cd:4a:e9:e1:ee:e4:59:14:24:4e:dc:d7:95: + ef:4b:b8:03:2b:f5:d6:0f:72:8e:78:21:4b:9b:18: + 37:c7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE - Netscape Comment: - OpenSSL Generated Certificate X509v3 Subject Key Identifier: - 2C:FE:68:9B:AD:6D:20:F5:37:62:AA:3C:FE:D8:70:94:47:75:87:1D + 9C:E1:70:C1:91:FA:A9:14:E3:C9:26:C6:DE:A4:84:8D:7A:E7:4C:B1 X509v3 Authority Key Identifier: - keyid:AA:B5:9C:D4:9C:C9:0C:A7:C8:55:0C:9E:98:EE:55:03:52:00:D9:08 - + 90:74:F2:7B:0D:0F:62:6C:DD:37:ED:A0:2B:AF:D7:3C:FC:EA:F3:9D Signature Algorithm: sha256WithRSAEncryption - 97:36:30:a3:b2:44:1f:d2:cc:27:64:22:85:31:9d:03:93:10: - 7b:bc:dc:05:76:49:aa:71:a1:70:11:2c:0d:63:6a:5f:0b:9e: - 3a:eb:f0:dc:d8:32:54:c5:13:3b:a0:76:b5:9b:f6:62:f7:1a: - 7b:b7:a4:2b:b4:0e:b3:f2:86:fa:22:94:ab:0f:34:2d:10:98: - 8a:62:c2:25:33:12:45:96:ae:e9:95:74:49:5b:86:5d:42:a5: - b7:b3:ca:e2:1d:9a:a5:81:09:ff:39:ee:fa:98:81:a7:ad:85: - 69:1a:ef:d1:73:15:04:b1:82:6e:8f:5b:5b:f7:03:16:0b:47: - df:a5:c6:78:26:c6:2a:09:09:3a:9b:8b:ee:2e:3e:14:f7:97: - 4d:af:1b:d0:8f:07:7c:e2:6b:5a:b5:d0:3b:cc:e6:8e:97:81: - 7b:eb:82:63:f5:cc:42:59:4b:47:ff:2b:ec:f8:0a:55:a5:b6: - 15:ba:1d:34:f5:59:11:dd:2a:13:72:b2:98:40:66:45:00:bf: - b3:65:17:6b:c2:15:ca:53:0a:01:26:c3:8f:09:cf:56:78:33: - 41:cc:2a:62:cd:38:9d:16:a3:ec:cf:f5:59:bf:5f:ab:2b:2a: - e6:12:f5:27:f5:30:9d:80:fb:20:4d:a6:f6:a5:6f:48:e9:59: - dc:8c:3c:72 + Signature Value: + 52:76:79:d7:ee:da:06:a9:1b:dd:6a:4b:66:01:e7:90:ce:14: + 70:21:b7:09:8b:83:43:7b:0a:17:53:7f:6b:f7:e7:74:71:3c: + 1b:1b:44:8f:21:c6:a4:4d:54:10:1d:13:89:a7:2e:d0:0a:91: + 03:01:9a:5b:bb:bd:61:27:a2:05:40:a0:0a:1b:02:71:dc:75: + f7:10:3d:00:c8:f7:15:77:fc:f6:83:99:de:4c:57:8c:81:0b: + 21:5a:43:03:bf:4e:a3:9d:c7:2a:58:6c:76:9e:14:b1:81:0f: + 8b:e2:a8:85:cd:3a:52:af:c0:4e:3c:87:1d:56:2e:14:c9:c0: + d2:ba:cd:df:e4:36:f5:41:55:b1:8e:4e:d7:f4:b7:8b:f6:62: + cc:31:3c:44:20:a6:cd:75:f8:0e:a1:88:5c:ea:04:94:6c:e9: + ee:f4:04:d9:49:31:78:51:90:1f:02:ee:05:73:28:e8:d0:cc: + a2:f0:65:1e:1a:df:08:89:1f:23:57:24:1b:ff:a1:0f:b6:8b: + d9:13:bd:6e:7a:00:c5:cf:56:2c:1a:28:e4:57:04:36:15:a2: + bb:eb:a9:35:f6:72:04:9b:45:cb:db:36:50:a7:9c:3f:28:24: + ce:53:29:3c:1b:fe:73:87:bb:87:ba:e3:ab:d7:46:91:cf:7e: + 32:ff:c0:a3 -----BEGIN CERTIFICATE----- -MIIDrjCCApagAwIBAgIUU+ylbeAzCz8bZGSfjKJlfsGbxcowDQYJKoZIhvcNAQEL +MIIDgDCCAmigAwIBAgIUQ28oQzTQR2x0+iNCR7CvE3MOGxMwDQYJKoZIhvcNAQEL BQAwVDELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEdGVzdDAeFw0yMTA2 -MTIxMzM1NTBaFw0yMjA2MTIxMzM1NTBaMFExCzAJBgNVBAYTAkFVMRMwEQYDVQQI +GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEdGVzdDAeFw0yMjA2 +MTQxMDU0N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qVvSOlZ3Iw8cg== +CjAIBgNVBAMMASowggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDP5a0h +NGhETO7aPsqRVenP/MkEvf8lR+RecnapPLB2SNd9+SyAMdO/NobNFI+//xA9SA9M +8lwpJ3N7yf6hLc1FFpzq7xAohoHwW9sZoeBFyg7Jqd0YDRpFeEAXAVrn2vsxOJRu +JQpwChE9keHq9xV1EYtdw1HUke6Uqw+lpmYOEDC7YFVgwlGAt1iygJa/Izb2jAyL +YxBHL3yJssPjTsJydIXvYIysVFgsuxeYYWCtQzij8yIqTKZCjsH5HAYhxyS/kQm/ +ZIfunReqA0HNsutO3/XoasaWstOllqsWTwQxRgN1zUrp4e7kWRQkTtzXle9LuAMr +9dYPco54IUubGDfHAgMBAAGjTTBLMAkGA1UdEwQCMAAwHQYDVR0OBBYEFJzhcMGR ++qkU48kmxt6khI1650yxMB8GA1UdIwQYMBaAFJB08nsND2Js3TftoCuv1zz86vOd +MA0GCSqGSIb3DQEBCwUAA4IBAQBSdnnX7toGqRvdaktmAeeQzhRwIbcJi4NDewoX +U39r9+d0cTwbG0SPIcakTVQQHROJpy7QCpEDAZpbu71hJ6IFQKAKGwJx3HX3ED0A +yPcVd/z2g5neTFeMgQshWkMDv06jnccqWGx2nhSxgQ+L4qiFzTpSr8BOPIcdVi4U +ycDSus3f5Db1QVWxjk7X9LeL9mLMMTxEIKbNdfgOoYhc6gSUbOnu9ATZSTF4UZAf +Au4Fcyjo0Myi8GUeGt8IiR8jVyQb/6EPtovZE71uegDFz1YsGijkVwQ2FaK766k1 +9nIEm0XL2zZQp5w/KCTOUyk8G/5zh7uHuuOr10aRz34y/8Cj -----END CERTIFICATE----- diff --git a/test/ssl/invalid_peer_private_key.pem b/test/ssl/invalid_peer_private_key.pem index 211b01077c3..e2395389307 100644 --- a/test/ssl/invalid_peer_private_key.pem +++ b/test/ssl/invalid_peer_private_key.pem @@ -1,30 +1,30 @@ -----BEGIN ENCRYPTED PRIVAT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rx1LPyqhNwozkk+9oa8MajCXmXtHmCRT0l3AkUPQmwdxDE63jn0k6sEJh +5HlNfMnjgkI79KyMs0cfrKV5DWgT1tOWQ5Zf2a5HjYXokN98PqSmDrSoLIm98gU1 +rkhiaSzXw6IUbNfv6e0dcb0N+JHKvWmA4N695hqMI0ve+1uuzFuWkace5Xvvnr8i +vh9YqlvozsOQ46cu2xgtfyg/Y+l5t8mMJmeolwKpOwkoIJPQ9StgJFinczeLIkau +jnEgSRaRE3Hi3G9cTr48dI7k1CHxhTRKWLUUxSYbXCJ2QxWXbPjMjr/TN1ZeUrU1 +SIECgFXULAt+uyV9IKeViA== -----END ENCRYPTED PRIVATE KEY----- diff --git a/test/ssl/peer_certificate.pem b/test/ssl/peer_certificate.pem index d852a1afd56..d53f3c48224 100644 --- a/test/ssl/peer_certificate.pem +++ b/test/ssl/peer_certificate.pem @@ -2,78 +2,78 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - 43:6f:28:43:34:d0:47:6c:74:fa:23:42:47:b0:af:13:73:0e:1b:13 + 2d:aa:29:0d:f2:c4:b4:7e:00:90:16:61:f8:60:11:2b:2a:0d:bb:3e Signature Algorithm: sha256WithRSAEncryption Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=test Validity - Not Before: Jun 14 10:54:46 2022 GMT - Not After : Jun 14 10:54:46 2023 GMT + Not Before: Jul 3 11:42:31 2023 GMT + Not After : Jul 2 11:42:31 2024 GMT Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=* Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cf:e5:ad:21:34:68:44:4c:ee:da:3e:ca:91:55: - e9:cf:fc:c9:04:bd:ff:25:47:e4:5e:72:76:a9:3c: - b0:76:48:d7:7d:f9:2c:80:31:d3:bf:36:86:cd:14: - 8f:bf:ff:10:3d:48:0f:4c:f2:5c:29:27:73:7b:c9: - fe:a1:2d:cd:45:16:9c:ea:ef:10:28:86:81:f0:5b: - db:19:a1:e0:45:ca:0e:c9:a9:dd:18:0d:1a:45:78: - 40:17:01:5a:e7:da:fb:31:38:94:6e:25:0a:70:0a: - 11:3d:91:e1:ea:f7:15:75:11:8b:5d:c3:51:d4:91: - ee:94:ab:0f:a5:a6:66:0e:10:30:bb:60:55:60:c2: - 51:80:b7:58:b2:80:96:bf:23:36:f6:8c:0c:8b:63: - 10:47:2f:7c:89:b2:c3:e3:4e:c2:72:74:85:ef:60: - 8c:ac:54:58:2c:bb:17:98:61:60:ad:43:38:a3:f3: - 22:2a:4c:a6:42:8e:c1:f9:1c:06:21:c7:24:bf:91: - 09:bf:64:87:ee:9d:17:aa:03:41:cd:b2:eb:4e:df: - f5:e8:6a:c6:96:b2:d3:a5:96:ab:16:4f:04:31:46: - 03:75:cd:4a:e9:e1:ee:e4:59:14:24:4e:dc:d7:95: - ef:4b:b8:03:2b:f5:d6:0f:72:8e:78:21:4b:9b:18: - 37:c7 + 00:ab:28:ef:c2:6b:49:b0:99:59:9d:69:7c:d3:54: + b7:a4:e6:58:bf:51:7d:de:4f:d2:31:87:a4:5b:ef: + 15:79:11:3b:d1:60:5d:92:f4:79:ae:2e:fe:13:8b: + 0b:0f:06:a4:44:e2:55:8f:c3:cc:93:1d:54:65:f4: + c1:11:59:55:a2:ec:7f:15:f4:11:16:ee:cf:32:f1: + 66:72:d7:25:17:a6:b0:94:5f:d2:88:5c:50:73:c9: + 85:7a:90:af:e0:d9:d1:33:41:f0:58:93:84:82:7b: + 3d:55:bc:59:a4:dc:c7:0c:31:9d:b0:27:f2:94:79: + 69:ae:68:d0:4b:7f:6e:e5:54:05:dc:af:62:f9:de: + 07:d7:47:e4:a0:9a:f8:bb:48:47:5b:51:cd:1c:f9: + f1:fa:1d:d9:79:fa:6e:44:a7:2d:07:c5:78:61:f5: + 76:ba:d7:66:99:60:97:65:5b:a9:d8:53:f5:11:76: + 7f:05:88:5e:b7:f6:38:81:65:34:80:4f:9b:91:79: + 9f:aa:4c:64:e4:94:67:cd:8e:7d:6b:80:f1:8a:49: + d5:27:af:55:a0:a5:27:4f:0f:1e:59:af:a6:c9:4c: + 12:4b:d9:f1:f2:15:01:8d:f6:a5:6c:2b:b8:75:dc: + 7f:a8:52:0e:03:41:86:e8:17:13:fd:65:40:9a:09: + 66:13 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE X509v3 Subject Key Identifier: - 9C:E1:70:C1:91:FA:A9:14:E3:C9:26:C6:DE:A4:84:8D:7A:E7:4C:B1 + D3:96:63:F7:D7:0F:80:65:B8:71:A4:83:C0:35:35:BE:4E:AA:34:8F X509v3 Authority Key Identifier: - 90:74:F2:7B:0D:0F:62:6C:DD:37:ED:A0:2B:AF:D7:3C:FC:EA:F3:9D + 21:F5:CC:2F:30:24:A3:B7:A9:8D:6E:03:3D:E2:F4:04:9C:FB:1E:74 Signature Algorithm: sha256WithRSAEncryption Signature Value: - 52:76:79:d7:ee:da:06:a9:1b:dd:6a:4b:66:01:e7:90:ce:14: - 70:21:b7:09:8b:83:43:7b:0a:17:53:7f:6b:f7:e7:74:71:3c: - 1b:1b:44:8f:21:c6:a4:4d:54:10:1d:13:89:a7:2e:d0:0a:91: - 03:01:9a:5b:bb:bd:61:27:a2:05:40:a0:0a:1b:02:71:dc:75: - f7:10:3d:00:c8:f7:15:77:fc:f6:83:99:de:4c:57:8c:81:0b: - 21:5a:43:03:bf:4e:a3:9d:c7:2a:58:6c:76:9e:14:b1:81:0f: - 8b:e2:a8:85:cd:3a:52:af:c0:4e:3c:87:1d:56:2e:14:c9:c0: - d2:ba:cd:df:e4:36:f5:41:55:b1:8e:4e:d7:f4:b7:8b:f6:62: - cc:31:3c:44:20:a6:cd:75:f8:0e:a1:88:5c:ea:04:94:6c:e9: - ee:f4:04:d9:49:31:78:51:90:1f:02:ee:05:73:28:e8:d0:cc: - a2:f0:65:1e:1a:df:08:89:1f:23:57:24:1b:ff:a1:0f:b6:8b: - d9:13:bd:6e:7a:00:c5:cf:56:2c:1a:28:e4:57:04:36:15:a2: - bb:eb:a9:35:f6:72:04:9b:45:cb:db:36:50:a7:9c:3f:28:24: - ce:53:29:3c:1b:fe:73:87:bb:87:ba:e3:ab:d7:46:91:cf:7e: - 32:ff:c0:a3 + 66:7f:0c:0b:00:a7:8f:a7:b1:71:f5:a1:44:f9:60:22:f7:70: + f1:46:04:be:cf:64:a8:62:25:b0:43:69:b8:84:7d:54:3f:25: + 0a:a9:f8:1e:e4:42:a3:7f:58:3e:70:7e:5a:2e:48:49:ab:82: + e8:b8:c9:11:cb:33:c3:33:26:19:8b:a9:b2:85:23:4f:cb:4f: + 66:92:9e:5c:b1:15:52:e5:9b:14:74:18:3d:e2:8d:a1:0f:ee: + 97:ce:0e:50:ef:cc:53:d4:8f:dc:e4:f1:be:ec:c1:85:8e:6c: + 15:c2:b6:7a:13:b5:57:aa:49:1d:32:b2:d9:6b:0a:3d:58:ef: + 32:f7:f5:df:00:59:d8:fa:51:52:6b:de:45:5a:66:f8:ee:bc: + a6:ea:36:7a:fc:25:85:4f:c2:79:22:4c:90:d6:24:df:52:cd: + 9d:49:e8:55:16:d1:7b:09:66:46:80:ca:30:02:cc:fc:3e:ea: + de:7c:b8:3c:be:a5:8c:ea:7f:db:01:fb:ed:94:95:c0:76:3c: + d8:26:59:55:a2:5e:97:45:68:56:ea:f5:9a:1e:a0:d6:98:38: + 0c:5e:06:41:6a:f9:f3:e9:60:ff:c3:ae:0b:54:60:fd:17:10: + 51:e9:c9:ca:04:d0:5d:91:34:33:56:90:59:55:46:2f:d7:ec: + b8:65:a3:c3 -----BEGIN CERTIFICATE----- -MIIDgDCCAmigAwIBAgIUQ28oQzTQR2x0+iNCR7CvE3MOGxMwDQYJKoZIhvcNAQEL +MIIDgDCCAmigAwIBAgIULaopDfLEtH4AkBZh+GARKyoNuz4wDQYJKoZIhvcNAQEL BQAwVDELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GElud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--git a/test/ssl/peer_private_key.pem b/test/ssl/peer_private_key.pem index e2395389307..60b9dfb6263 100644 --- a/test/ssl/peer_private_key.pem +++ b/test/ssl/peer_private_key.pem @@ -1,30 +1,30 @@ -----BEGIN ENCRYPTED PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIMmDN+9v+64ECAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECPgER24ZRktJBIIEyOnZQ6QUnkmD -5VWYpD3faPQTe92SBFEeaW+ds41DNzy5ePbLuLFMzfBC4ZgYUCfNen8bRDVeAP2U -Ln51cODpkISManaIXm2yvMywyvexf5f7bKm4MmmYcM1y2P0PtC74nxz5yr9c5H4z -wxGNE/cI1ACt2/B7RyA3CyHVQ1J1uR1OMJj5HshUqiWG+0DoduKP+kJGMdkO0RX5 -u6trqfP3iVCmBf0B6zFlXsn9Fre19VEP35ABMuiem9FnLoPx2z4G25txHMspf9+B -tQvvBWMf+HZs73//RzL1or1AVJCBT42LAuBHcrswvqwQfuz3lc5JTK54vKrB+8Zf -50hnc9T7YC3CJ3GqijaY7rB+3gcfUiD/IcP2jn9zYYRbg7HklHoSacyd4mu52C7d -DS2Hj4kBM7IDa1xrpSiYNeyr+7wPwGqg0odjfRYOzNVP0MtbwRh1AGgKsWOyH06T -h4G9hP8fjYkJG6wzr64jh078aAINk+2SgN0Tbiejdm5D/6R2Mbdm9adogf7ONGfl -+f+NJShWrheaOGdKX28YLeErIZvSNgVgKA3m0bR7+6lTB7ncXQanTE4ps5g4nZcr -RRJJp1XwXQhL/GWpCNiV3DuEVLtGYiLnG9kUootILOGTpdX6HL/VK1G3v2bM03LL -QaSJ69wgNcPErxB4l4ak3u5DliNLugZqmC7MfRFZcbBtKspAmAtQpgDcitnfqq7H -OnYXzsXJKMOnOTTA0kJNb2mT83YZZM/myoyjE9IpwuLSZXwlVvTixNLnYieBpy/E -hbybop1o8YGIGg1Ynt6XkmEBDA2LzYKw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F/e2euJ0sjFpuuzUom0FcjWxm/QmvLw6gSIKEpsbag87J1Lsy99t2Y+ANS2u +HaBVi0IHt3JcXYTSFQUb+qsqfCt+J0bLtfgnBtkrbeu31SF0vn37AqOcXK+//8zh +dVbWZzmtw50bUJ1LuQiGjXY7ktGhAiHPIJRjxfKeaw7zHbeI5V9MlMr/XrD6WDmz +83m9Ew9iWMDBXIIhx5R+tTubO+yap8LFi3KWoYjW1vagQQJgOJjDIMJNqHMrPqAn +bSkksKq3k4gTZxBC8d2aobyDBusD69Puy6r0efpq1ZIXNpb2CvHausFRYybijH9g +tNURJemrJb8/W0wQhZE22t9z1gJ/35sQKmIqQndYUpibQDA8WklDne3YcDAyS1fG +FJlUfaCmCKSG1ULf0mFesxa8RKbpQVKYXnJ+BE/PhwzF35qhRrvWzgEV+r9Ubo1u +wTAbVk0wzkY2tcftsbb7Rw== -----END ENCRYPTED PRIVATE KEY----- diff --git a/test/ssl/regenerate_test_certificate.sh b/test/ssl/regenerate_test_certificate.sh index c0cc8652404..58adcc9be71 100755 --- a/test/ssl/regenerate_test_certificate.sh +++ b/test/ssl/regenerate_test_certificate.sh @@ -17,7 +17,7 @@ rm -rf demoCA printf "\n\n ======== \e[33muse passphrase: \"test\" \e[0m=========\n\n" printf "\n\n ======== \e[33muse common name: \"test\" \e[0m=========\n\n" -CA.pl -newca -extra-cmd rsa:4096 +CA.pl -newca cp ./demoCA/cacert.pem root_ca_cert.pem cp ./demoCA/private/cakey.pem root_ca_private.pem @@ -25,7 +25,7 @@ cp ./demoCA/private/cakey.pem root_ca_private.pem printf "\n\n ======== \e[33muse passphrase: \"test\" \e[0m=========\n\n" printf "\n\n ======== \e[33muse common name: * \e[0m=========\n\n" -CA.pl -newreq -extra-cmd rsa:4096 +CA.pl -newreq cp newkey.pem peer_private_key.pem diff --git a/test/ssl/root_ca_cert.pem b/test/ssl/root_ca_cert.pem index b7291cc933d..3263e4f42cf 100644 --- a/test/ssl/root_ca_cert.pem +++ b/test/ssl/root_ca_cert.pem @@ -2,78 +2,78 @@ Certificate: Data: Version: 3 (0x2) Serial Number: - 43:6f:28:43:34:d0:47:6c:74:fa:23:42:47:b0:af:13:73:0e:1b:12 + 2d:aa:29:0d:f2:c4:b4:7e:00:90:16:61:f8:60:11:2b:2a:0d:bb:3d Signature Algorithm: sha256WithRSAEncryption Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=test Validity - Not Before: Jun 14 10:54:23 2022 GMT - Not After : Jun 13 10:54:23 2025 GMT + Not Before: Jul 3 11:42:15 2023 GMT + Not After : Jul 2 11:42:15 2026 GMT Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=test Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a9:c4:bc:dc:b0:0a:53:09:e3:4b:85:1d:37:6f: - 16:73:93:3f:74:ca:45:2d:bd:f8:93:c9:f3:fe:a2: - 1f:b3:f9:e8:1a:ab:43:03:5a:5d:14:8b:ea:8f:1a: - 5f:d7:56:0a:2c:15:0a:c9:70:54:23:8b:d3:68:4e: - f5:3b:be:48:06:0f:c4:68:9d:ba:53:bb:72:1e:f0: - 92:c5:80:4f:e5:14:8a:12:38:4e:69:e3:65:99:d4: - f4:69:2d:f9:86:f5:07:8f:3b:9c:d7:11:26:96:e7: - 19:9b:98:80:1c:74:96:6b:1f:69:fc:34:bd:f5:58: - 4c:68:d0:78:86:47:a4:a7:48:02:88:3c:31:55:c1: - e5:cf:97:3f:55:d8:f1:d0:85:e0:86:f4:a7:86:bb: - 99:16:7e:bc:ba:db:b7:49:08:be:c1:05:d2:5d:46: - 28:ee:66:c9:42:82:5f:4d:0e:3d:18:c9:2a:02:17: - 4f:30:01:12:19:f0:0b:45:c6:df:0e:6b:62:23:d8: - c5:28:4a:84:33:29:13:0b:3b:20:d5:98:d5:08:cb: - bb:0f:c3:f4:cb:d9:30:b3:40:0a:1c:c8:a9:45:1f: - 5d:3a:93:38:8e:80:04:54:f8:ef:98:53:6c:86:b1: - bf:6a:1a:53:c1:b1:40:f5:2e:30:f4:3d:4c:e5:19: - b6:13 + 00:aa:b5:56:b7:70:da:25:a0:79:fc:28:b3:0b:81: + da:a9:4a:a1:26:5f:fa:90:c3:7d:99:6e:3e:f4:5e: + 7c:cc:3e:9b:34:da:d8:67:e7:c6:97:df:b5:c8:62: + 1a:ef:bc:f0:aa:58:70:73:65:12:ce:2e:a9:de:1e: + 4b:e5:bd:6d:46:d5:28:2e:e4:91:ee:7b:fe:b3:37: + 2d:7c:f9:96:35:3e:f6:7a:36:b5:6d:bd:b4:4c:d3: + 0d:a6:37:43:89:61:85:1a:f7:30:3b:bf:a6:74:52: + 3a:cd:00:d5:c8:7e:f2:c2:e4:e6:49:66:00:79:c5: + 1b:7b:ac:89:02:e0:bd:e1:69:43:34:f4:9d:19:d8: + 90:98:82:37:77:de:0d:6d:36:92:e4:66:de:80:27: + 90:45:f6:d6:33:21:3b:b8:6f:f3:47:f1:1c:59:20: + c0:b8:df:4f:44:73:4b:a9:e5:ea:3b:b4:14:c2:51: + b7:f1:bb:52:12:e6:91:97:06:e9:84:c0:83:65:52: + b0:f0:56:24:bb:e5:1e:80:e0:ce:94:3a:14:07:ad: + cf:37:75:7b:22:ad:8e:d5:87:28:0d:58:0a:4b:0e: + 90:37:6d:ec:1f:4d:d2:33:83:94:78:b0:33:8e:f1: + 71:bd:55:6f:cf:7c:10:21:e7:cf:78:eb:22:4c:a5: + e0:9b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 90:74:F2:7B:0D:0F:62:6C:DD:37:ED:A0:2B:AF:D7:3C:FC:EA:F3:9D + 21:F5:CC:2F:30:24:A3:B7:A9:8D:6E:03:3D:E2:F4:04:9C:FB:1E:74 X509v3 Authority Key Identifier: - 90:74:F2:7B:0D:0F:62:6C:DD:37:ED:A0:2B:AF:D7:3C:FC:EA:F3:9D + 21:F5:CC:2F:30:24:A3:B7:A9:8D:6E:03:3D:E2:F4:04:9C:FB:1E:74 X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption Signature Value: - 16:81:df:d2:85:73:03:62:0c:af:a3:1a:be:fa:32:9f:1a:f3: - 89:5f:d6:e6:3f:87:b9:11:f2:c1:1c:4e:eb:ca:3e:61:41:f3: - 8f:af:02:c4:f6:31:ed:58:a4:62:26:aa:fc:47:38:0a:76:ed: - 44:d0:2d:8c:9a:d1:b4:ae:b3:12:f6:d0:06:59:c0:92:21:da: - 57:a6:bd:59:ae:64:db:cf:a8:43:20:a1:b0:17:1d:96:9a:5f: - 57:0b:9d:50:1e:9f:99:6c:c0:94:94:68:5f:9c:7a:f7:a6:67: - dc:f2:46:9d:bb:98:f3:91:8a:33:5c:97:62:3a:6d:ea:96:d9: - 91:82:93:cf:92:70:39:21:5a:96:a9:4d:81:94:2e:ef:bc:ed: - 31:ec:ef:74:cd:0d:33:d6:6a:79:e7:93:40:7c:27:ab:4a:ff: - a8:4c:13:a1:96:6b:7a:65:b5:2a:1e:17:94:c3:2a:8f:ba:09: - bd:67:60:ec:3f:3b:b9:6e:fb:12:70:f4:c6:be:59:40:81:9b: - 07:19:f3:54:df:bc:2d:c5:1e:d4:a9:b7:db:d9:27:ad:45:90: - 62:91:99:95:31:d6:64:80:86:a0:76:ae:86:0e:59:68:26:72: - 58:fd:c5:ed:14:fa:4e:c8:94:f5:46:07:ae:62:55:b4:e8:6c: - c9:1f:8d:15 + 05:2a:96:83:50:21:2b:30:88:67:e0:05:ec:05:7c:f7:53:ec: + f9:ea:7e:d9:9d:3c:64:dd:d4:b2:36:9b:ab:02:3a:66:f4:db: + ef:c9:d5:8e:89:88:5b:e3:cf:1b:e1:28:ff:ec:62:66:e5:6b: + 0b:fb:f6:e7:f6:69:0d:88:42:42:cf:d4:0b:75:e0:06:84:cc: + 75:56:18:ff:22:b8:9c:7b:0c:a7:83:c4:f0:60:10:4e:b7:05: + 07:0d:64:fb:e6:42:31:0f:66:f4:e2:fd:3c:74:1f:04:b2:89: + da:fa:3a:09:38:32:77:75:cf:ba:87:24:5a:e6:bb:b2:5f:f0: + 0a:d4:5f:ea:d1:78:f9:f6:72:a2:f4:05:5c:9c:8b:57:16:8b: + 8d:24:43:7e:e9:0f:5e:ee:3d:ba:c3:9c:d2:ec:2c:f6:2d:69: + 8b:0d:4a:52:cb:9d:0f:88:34:96:f4:ae:6f:c6:8f:8f:f6:fb: + 03:59:d9:18:b1:11:51:2b:4e:b7:c5:95:83:ee:a0:85:ab:ca: + 78:97:19:9e:1c:68:52:7e:3d:ae:44:aa:38:0c:02:b6:41:17: + 43:3c:92:21:6c:b8:4e:1f:ef:71:22:e8:76:d5:ca:59:21:ee: + ec:88:5d:2c:d8:fb:ec:1e:95:ac:53:72:82:d0:2d:7e:f7:43: + 74:db:1e:27 -----BEGIN CERTIFICATE----- -MIIDiTCCAnGgAwIBAgIUQ28oQzTQR2x0+iNCR7CvE3MOGxIwDQYJKoZIhvcNAQEL +MIIDiTCCAnGgAwIBAgIULaopDfLEtH4AkBZh+GARKyoNuz0wDQYJKoZIhvcNAQEL BQAwVDELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEdGVzdDAeFw0yMjA2 -MTQxMDU0MjNaFw0yNTA2MTMxMDU0MjNaMFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQI +GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEdGVzdDAeFw0yMzA3 +MDMxMTQyMTVaFw0yNjA3MDIxMTQyMTVaMFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQI DApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQx -DTALBgNVBAMMBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCp -xLzcsApTCeNLhR03bxZzkz90ykUtvfiTyf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AJ5BF9tYzITu4b/NH8RxZIMC4309Ec0up5eo7tBTCUbfxu1IS5pGXBumEwINl +UrDwViS75R6A4M6UOhQHrc83dXsirY7VhygNWApLDpA3bewfTdIzg5R4sDOO8XG9 +VW/PfBAh58946yJMpeCbAgMBAAGjUzBRMB0GA1UdDgQWBBQh9cwvMCSjt6mNbgM9 +4vQEnPsedDAfBgNVHSMEGDAWgBQh9cwvMCSjt6mNbgM94vQEnPsedDAPBgNVHRMB +Af8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAFKpaDUCErMIhn4AXsBXz3U+z5 +6n7ZnTxk3dSyNpurAjpm9NvvydWOiYhb488b4Sj/7GJm5WsL+/bn9mkNiEJCz9QL +deAGhMx1Vhj/Iricewyng8TwYBBOtwUHDWT75kIxD2b04v08dB8Esona+joJODJ3 +dc+6hyRa5ruyX/AK1F/q0Xj59nKi9AVcnItXFouNJEN+6Q9e7j26w5zS7Cz2LWmL +DUpSy50PiDSW9K5vxo+P9vsDWdkYsRFRK063xZWD7qCFq8p4lxmeHGhSfj2uRKo4 +DAK2QRdDPJIhbLhOH+9xIuh21cpZIe7siF0s2PvsHpWsU3KC0C1+90N02x4n -----END CERTIFICATE----- diff --git a/test/ssl/root_ca_private.pem b/test/ssl/root_ca_private.pem index 021f8f36a5e..9bb8b7e1218 100644 --- a/test/ssl/root_ca_private.pem +++ b/test/ssl/root_ca_private.pem @@ -1,30 +1,30 @@ -----BEGIN ENCRYPTED PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIC4c7DMtL1P8CAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECHeDOFTxSUPrBIIEyFEPRkjqhQDD -tOxdyKFx+i0IGWAzTiicnwiOH96TLqYB25E9VPGGxpFgmyRDW0umtPccRq4FAeLN -2btu6pd8RsFWnqtyvT84avcHazj8URQXi7alhgjvg2130LsXlJmk3rcQaWr01c86 -BPHSMicJfVEtxHY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GL11vOtwF8iBdw29y7QH2xBAHrF71+FeKgl4 +W5cc+CJmH4n0Br9pTk45LQ== -----END ENCRYPTED PRIVATE KEY----- diff --git a/test/ssl/server.pem b/test/ssl/server.pem index 150561b9402..139d0d18f41 100644 --- a/test/ssl/server.pem +++ b/test/ssl/server.pem @@ -1,79 +1,84 @@ -----BEGIN PRIVATE KEY----- -MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC0Lof4BSUxZ752 -OQWsVe0bnNMF4529tn5OnUzUMGAWBDK+WxBjm/4VASKLDEW1KLUFTz6NHoqCHyu0 -EF5rqG6IN40HFy8IYW/gSCx88bNAxc3ZStk7eblZXziuDG7wRQKFqJP0RcBAQpZi -l63G8m0yE2lRwPqpGkRhdMqi/7T1lFIRc1WJALHEFhZvMsX70zV9K6JKcL4Mt17l -UrRqeRGiAaQPsevihPGj3yqQ5HjojbsBE3HD7d30palsgzykACyklZ2Ov/MoKMp8 -Et+0RW91ZLYHkZuew1om/gQybx8FpICa1UkEbSWdg5XkDajC48N+7Qgqhkw8sOS5 -b1KOadjepN/63YRmClVZGVSC1Cp8dqH+jF3gJZZggiVywy9HjgTPDfGLy9tJdsp2 -sik2hbUYSFfV5QF28nTaqwn7V86MToKLXoWo+exeOt+uN400VGhAyLtMu3qRuYtX -YqGCXFhnYLC83ZbM0nOVm9roF02PvEvSk/zsTMqr53hbyNx4+topFs7c/4C0DbbU -SVf5D9WlwY6xsTXQFTLWwXAfoX0R2GS+Xw81u56k9cQM8WqDt93iXPVwi3W+HJKE -TrYUYBdI2TvxF5MxwxQH3iIlktc9c6iVJxnZR/Dgck4jjHhuqtFP237sOKqpeHFd -J6Gl85WYwCJ66kkga59G8vRKTEkhBQIDAQABAoICAAPUbV1vNpArRVgb9Cvqk6Sf -m7inUuYCaALhww1Lje9J3Y5AP0Puv+LQaFyOQTkNiXN4cLrtKEKFyRcFtgwRw2+v -xpac/onuEEOzJQbu2EGLMsnoll92QeNNa9X/O6htvxT6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agzHnwC8OJqt6Uo9bV +dgcg9kov1sooukKKbKDRbik/cqecL7FbTLaTNhyB0pr/Me/VV3lPzmFip8kaanrp +ko2a/Pc24Xogm3rKiYTB6k8GFit6TranXdFP/7gxXNMNLYQ+wEi+nP18w/k6DZ6T +lXrH8n1vTnhLZ9zz0ZX7NEx7whc9lw== -----END PRIVATE KEY----- -----BEGIN CERTIFICATE----- -MIIElDCCAnwCCQCANS/0PGNwSzANBgkqhkiG9w0BAQsFADAMMQowCAYDVQQDDAEq -MB4XDTIyMDYxNDEwNTQwN1oXDTI1MDYxNTEwNTQwN1owDDEKMAgGA1UEAwwBKjCC -AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALQuh/gFJTFnvnY5BaxV7Ruc -0wXjnb22fk6dTNQwYBYEMr5bEGOb/hUBIosMRbUotQVPPo0eioIfK7QQXmuobog3 -jQcXLwhhb+BILHzxs0DFzdlK2Tt5uVlfOK4MbvBFAoWok/RFwEBClmKXrcbybTIT -aVHA+qkaRGF0yqL/tPWUUhFzVYkAscQWFm8yxfvTNX0rokpwvgy3XuVStGp5EaIB -pA+x6+KE8aPfKpDkeOiNuwETccPt3fSlqWyDPKQALKSVnY6/8ygoynwS37RFb3Vk -tgeRm57DWib+BDJvHwWkgJrVSQRtJZ2DleQNqMLjw37tCCqGTDyw5LlvUo5p2N6k -3/rdhGYKVVkZVILUKnx2of6MXeAllmCCJXLDL0eOBM8N8YvL20l2ynayKTaFtRhI -V9XlAXbydNqrCftXzoxOgotehaj57F463643jTRUaEDIu0y7epG5i1dioYJcWGdg -sLzdlszSc5Wb2ugXTY+8S9KT/OxMyqvneFvI3Hj62ikWztz/gLQNttRJV/kP1aXB -jrGxNdAVMtbBcB+hfRHYZL5fDzW7nqT1xAzxaoO33eJc9XCLdb4ckoROthRgF0jZ -O/EXkzHDFAfeIiWS1z1zqJUnGdlH8OByTiOMeG6q0U/bfuw4qql4cV0noaXzlZjA -InrqSSBrn0by9EpMSSEFAgMBAAEwD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ztLpnn+XB +2IOb1bqpUwbFATLyqbT9JDDtOmNRQn0emxqCd2c918/+vAgjHZI9aGlmKz7Z6o8V +ziH90kIL659LxDtxMMwO5BxsE7Yz/bny4sXms8IahNomQMSmuCiyp5ctOZRgdOnv +qVeDvUUCrk5gf4Ygr46rr0m2tTE7ZUD0o97pA8yjEfEqyCBhEcZar+cnV9fN77nm +3R+S/jEjRQ7O8kyfJmmo2/RC9oUa/jbBo0E5nrJbxK6m6fdt8Z1VkIb6npx5j8pA +mKNQgihEzuc37smy2C1J3deKT1Dvu1PuUnW2oTir163/EPJJOubZ2CI0iP8/ooq1 +0Jp9+3YiM/YlzJKURLk/EdP2v9PA26Bqz+IltdDG576Xt7ueVt3df5S5fklxFfXP +Md/D7NSiMe00kYNeSnOGAKHKkiRhlL72S/8xivuYVRrCkQYrTzoklZe57i2MQYn2 +hiPPPWfPy+2R6LMnU5NfmHvKDJVdhFw= -----END CERTIFICATE----- From b82b350b38147ac7ddf6ec41027ebe07dc15f913 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 3 Jul 2023 14:11:16 +0200 Subject: [PATCH 07/29] Updated numerous repo addresses & revs of pre-commit-hooks. on behalf of @xavier2k6 --- .pre-commit-config.yaml | 18 ++++++++-------- bindings/python/setup.py | 1 - pyproject.toml | 44 ++++++++++++++++++++-------------------- tools/vmstat.py | 5 ----- 4 files changed, 31 insertions(+), 37 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fef8dd7742..2505ddb9b23 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: #- id: trailing-whitespace #- id: end-of-file-fixer @@ -32,12 +32,12 @@ repos: - id: check-symlinks - id: check-toml - repo: https://github.com/pappasam/toml-sort - rev: v0.20.1 + rev: v0.23.1 hooks: - id: toml-sort args: [--all, --in-place] - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: rst-directive-colons - id: rst-inline-touching-normal @@ -71,8 +71,8 @@ repos: tools/run_benchmark.py| tools/update_copyright.py )$ -- repo: https://github.com/myint/autoflake - rev: v1.7.6 +- repo: https://github.com/PyCQA/autoflake + rev: v2.1.1 hooks: - id: autoflake args: [--in-place, --remove-unused-variables, --remove-all-unused-imports, --remove-duplicate-keys] @@ -85,8 +85,8 @@ repos: tools/gen_convenience_header.py| tools/libtorrent_lldb.py ) -- repo: https://github.com/python/black - rev: 22.10.0 +- repo: https://github.com/psf/black + rev: 23.3.0 hooks: - id: black # Avoiding PR bloat @@ -132,7 +132,7 @@ repos: name: black (pyi) types: [pyi] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.982 + rev: v1.3.0 hooks: - id: mypy # Avoiding PR bloat @@ -171,7 +171,7 @@ repos: tools/update_copyright.py )$ - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 exclude: | diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 3653b9ae38a..0eb07c2b5c6 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -174,7 +174,6 @@ def write_b2_python_config( class LibtorrentBuildExt(build_ext_lib.build_ext): - CONFIG_MODE_DISTUTILS = "distutils" CONFIG_MODE_B2 = "b2" CONFIG_MODES = (CONFIG_MODE_DISTUTILS, CONFIG_MODE_B2) diff --git a/pyproject.toml b/pyproject.toml index ffae80da36b..a3b0b8c6955 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,36 +6,36 @@ skip = "{pp*,}" [tool.cibuildwheel.macos] before-all = [ - "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", - "brew install openssl", + "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", + "brew install openssl" ] test-command = [ - "cd {project}/bindings/python", - "python test.py", + "cd {project}/bindings/python", + "python test.py" ] [tool.cibuildwheel.macos.environment] BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" BOOST_VERSION = "1.81.0" -MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support +MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support PATH = "/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] before-all = [ - "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", - "yum install -y glibc-static", # needed for libutil.a and libdl.a - "./tools/cibuildwheel/setup_ccache_on_manylinux.sh", - "./tools/cibuildwheel/setup_openssl.sh", + "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", + "./tools/cibuildwheel/setup_ccache_on_manylinux.sh", + "./tools/cibuildwheel/setup_openssl.sh", + "yum install -y glibc-static" # needed for libutil.a and libdl.a ] before-test = "ccache -s" select = "*-manylinux_*" test-command = [ - "cd {project}/bindings/python", - "python test.py", + "cd {project}/bindings/python", + "python test.py" ] -[tool.cibuildwheel.overrides.environment] # sub-table of previous block! +[tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" BOOST_VERSION = "1.81.0" @@ -43,18 +43,18 @@ PATH = "/usr/local/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] before-all = [ - "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", - "apk add ccache openssl-dev openssl-libs-static", - "./tools/cibuildwheel/setup_openssl.sh", + "./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT", + "./tools/cibuildwheel/setup_openssl.sh", + "apk add ccache openssl-dev openssl-libs-static" ] before-test = "ccache -s" select = "*-musllinux_*" test-command = [ - "cd {project}/bindings/python", - "python test.py", + "cd {project}/bindings/python", + "python test.py" ] -[tool.cibuildwheel.overrides.environment] # sub-table of previous block! +[tool.cibuildwheel.overrides.environment] # sub-table of previous block! BOOST_BUILD_PATH = "/tmp/boost/tools/build" BOOST_ROOT = "/tmp/boost" BOOST_VERSION = "1.81.0" @@ -62,15 +62,15 @@ PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] before-all = [ - "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", - "bash -c 'choco install --no-progress --x86 openssl'", # choco only allows EITHER 32 OR 64-bit version of a package + "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", + "bash -c 'choco install --no-progress --x86 openssl'" # choco only allows EITHER 32 OR 64-bit version of a package ] select = "*-win32" [[tool.cibuildwheel.overrides]] before-all = [ - "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", - "bash -c 'choco install --no-progress openssl'", # choco only allows EITHER 32 OR 64-bit version of a package + "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", + "bash -c 'choco install --no-progress openssl'" # choco only allows EITHER 32 OR 64-bit version of a package ] select = "*-win_amd64" diff --git a/tools/vmstat.py b/tools/vmstat.py index 75796fddac1..13ec91654c0 100644 --- a/tools/vmstat.py +++ b/tools/vmstat.py @@ -174,7 +174,6 @@ def add_counter(key: str, val: float) -> None: val = val / time_delta output[key] = [val] else: - if m.cumulative: raw_val = val val = (val - output[key + "-raw"][-1]) / time_delta @@ -209,7 +208,6 @@ def add_counter(key: str, val: float) -> None: # Locked: 0 kB else: - import psutil def capture_sample( @@ -231,7 +229,6 @@ def capture_sample( output["time"].append(timestamp) for key in dir(mem): - if key not in metrics: if not key.startswith("_") and key not in [ "pagefile", @@ -259,7 +256,6 @@ def capture_sample( output[key].append(val) for key in dir(io_cnt): - if key not in metrics: if not key.startswith("_") and key not in [ "pagefile", @@ -286,7 +282,6 @@ def capture_sample( def print_output_to_file(out: Dict[str, List[int]], filename: str) -> List[str]: - if out == {}: return [] From 63373cf01276adc2ef54761c01e6671db4c68b4c Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sat, 12 Aug 2023 17:37:01 +0000 Subject: [PATCH 08/29] Fixes various typos Found via `codespell -q 3 -S "*.pem,*.torrent,./docs/hunspell,./src/puff.cpp" -L bu,fo,folx,ihs,ot,readd,requestor,te` --- ChangeLog | 44 +++++++++---------- bindings/python/src/error_code.cpp | 2 +- bindings/python/src/gil.hpp | 2 +- bindings/python/test.py | 2 +- docs/tuning.rst | 4 +- docs/upgrade_to_1.2.rst | 2 +- examples/connection_tester.cpp | 2 +- examples/torrent_view.cpp | 4 +- include/libtorrent/aux_/io.hpp | 2 +- include/libtorrent/aux_/merkle.hpp | 2 +- include/libtorrent/aux_/merkle_tree.hpp | 2 +- include/libtorrent/aux_/resolver.hpp | 2 +- .../libtorrent/aux_/resolver_interface.hpp | 2 +- include/libtorrent/aux_/session_impl.hpp | 2 +- include/libtorrent/aux_/utp_stream.hpp | 2 +- include/libtorrent/io.hpp | 2 +- include/libtorrent/kademlia/refresh.hpp | 2 +- include/libtorrent/mmap_storage.hpp | 2 +- include/libtorrent/peer_connection.hpp | 2 +- include/libtorrent/piece_picker.hpp | 4 +- include/libtorrent/proxy_base.hpp | 2 +- include/libtorrent/socks5_stream.hpp | 2 +- include/libtorrent/torrent.hpp | 4 +- simulation/disk_io.hpp | 2 +- simulation/test_file_pool.cpp | 2 +- simulation/test_http_connection.cpp | 2 +- simulation/test_socks5.cpp | 2 +- simulation/test_swarm.cpp | 2 +- simulation/test_timeout.cpp | 2 +- simulation/test_torrent_status.cpp | 12 ++--- simulation/test_utp.cpp | 2 +- src/bdecode.cpp | 2 +- src/choker.cpp | 2 +- src/enum_net.cpp | 2 +- src/file_storage.cpp | 4 +- src/file_view_pool.cpp | 2 +- src/gzip.cpp | 2 +- src/ip_notifier.cpp | 2 +- src/merkle_tree.cpp | 2 +- src/mmap_disk_io.cpp | 2 +- src/peer_connection.cpp | 2 +- src/peer_list.cpp | 2 +- src/piece_picker.cpp | 10 ++--- src/puff.cpp | 2 +- src/session_impl.cpp | 4 +- src/session_stats.cpp | 2 +- src/sha1.cpp | 8 ++-- src/time.cpp | 2 +- src/torrent.cpp | 6 +-- src/ut_metadata.cpp | 2 +- src/utp_stream.cpp | 6 +-- test/CMakeLists.txt | 2 +- test/http_proxy.py | 2 +- test/main.cpp | 2 +- test/test_bdecode.cpp | 2 +- test/test_dht.cpp | 4 +- test/test_http_parser.cpp | 2 +- test/test_peer_list.cpp | 2 +- test/test_piece_picker.cpp | 8 ++-- test/test_privacy.cpp | 2 +- test/test_remap_files.cpp | 2 +- test/test_resume.cpp | 4 +- test/test_similar_torrent.cpp | 2 +- test/test_ssl.cpp | 4 +- test/test_storage.cpp | 4 +- test/test_string.cpp | 2 +- test/test_torrent_info.cpp | 2 +- test/test_tracker.cpp | 2 +- 68 files changed, 118 insertions(+), 118 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57e6810dba9..12d415819b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -152,7 +152,7 @@ 2.0 released - * dropped depenency on iconv + * dropped dependency on iconv * deprecate set_file_hash() in torrent creator, as it's superceded by v2 torrents * deprecate mutable access to info_section in torrent_info * removed deprecated lazy_entry/lazy_bdecode @@ -270,7 +270,7 @@ * fix issue with moving the session object * deprecate torrent_status::allocating. This state is no longer used * fix bug creating torrents with symbolic links - * remove special case to save metadata in resume data unconditionally when added throught magnet link + * remove special case to save metadata in resume data unconditionally when added through magnet link * fix bugs in mutable-torrent support (reusing identical files from different torrents) * fix incorrectly inlined move-assignment of file_storage * add session::paused flag, and the ability to construct a session in paused mode @@ -324,7 +324,7 @@ * limit number of concurrent HTTP announces * fix queue position for force_rechecking a torrent that is not auto-managed * improve rate-based choker documentation, and minor tweak - * undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet) + * undeprecate upnp_ignore_nonrouters (but referring to devices on our subnet) * increase default tracker timeout * retry failed socks5 server connections * allow UPnP lease duration to be changed after device discovery @@ -404,7 +404,7 @@ 1.2.1 release * add dht_pkt_alert and alerts_dropped_alert to python bindings - * fix python bindins for block_uploaded_alert + * fix python bindings for block_uploaded_alert * optimize resolving duplicate filenames in loading torrent files * fix python binding of dht_settings * tighten up various input validation checks @@ -413,7 +413,7 @@ * fix python bindings for peer_info * support creating symlinks, for torrents with symlinks in them * fix error in seed_mode flag - * support magnet link parameters with number siffixes + * support magnet link parameters with number suffixes * consistently use "lt" namespace in examples and documentation * fix Mingw build to use native cryptoAPI * uPnP/NAT-PMP errors no longer set the client's advertised listen port to zero @@ -607,7 +607,7 @@ * fix infinite loop when parsing certain invalid magnet links * fix parsing of torrents with certain invalid filenames - * fix leak of torrent_peer objecs (entries in peer_list) + * fix leak of torrent_peer objects (entries in peer_list) * fix leak of peer_class objects (when setting per-torrent rate limits) * expose peer_class API to python binding * fix integer overflow in whole_pieces_threshold logic @@ -642,7 +642,7 @@ * fix proxying of https connections * fix race condition in disk I/O storage class * fix http connection timeout on multi-homed hosts - * removed depdendency on boost::uintptr_t for better compatibility + * removed dependency on boost::uintptr_t for better compatibility * fix memory leak in the disk cache * fix double free in disk cache * forward declaring libtorrent types is discouraged. a new fwd.hpp header is provided @@ -928,7 +928,7 @@ * tweak flag_override_resume_data semantics to make more sense (breaks backwards compatibility of edge-cases) * improve DHT bootstrapping and periodic refresh - * improve DHT maintanence performance (by pinging instead of full lookups) + * improve DHT maintenance performance (by pinging instead of full lookups) * fix bug in DHT routing table node-id prefix optimization * fix incorrect behavior of flag_use_resume_save_path * fix protocol race-condition in super seeding mode @@ -1111,7 +1111,7 @@ * fix piece-picker stat bug when only selecting some files for download * fix bug in async_add_torrent when settings file_priorities * fix boost-1.42 support for python bindings - * fix memory allocation issue (virtual addres space waste) on windows + * fix memory allocation issue (virtual address space waste) on windows 0.16.11 release @@ -1127,7 +1127,7 @@ * GCC 4.8 fix * fix proxy failure semantics with regards to anonymous mode * fix round-robin seed-unchoke algorithm - * add bootstrap.sh to generage configure script and run configure + * add bootstrap.sh to generate configure script and run configure * fix bug in SOCK5 UDP support * fix issue where torrents added by URL would not be started immediately @@ -1304,7 +1304,7 @@ * support banning web seeds sending corrupt data * don't let hung outgoing connection attempts block incoming connections * improve SSL torrent support by using SNI and a single SSL listen socket - * improved peer exchange performance by sharing incoming connections which advertize listen port + * improved peer exchange performance by sharing incoming connections which advertise listen port * deprecate set_ratio(), and per-peer rate limits * add web seed support for torrents with pad files * introduced a more scalable API for torrent status updates (post_torrent_updates()) and updated client_test to use it @@ -1696,7 +1696,7 @@ release 0.14.9 release 0.14.8 - * ignore unkown metadata messages + * ignore unknown metadata messages * fixed typo that would sometimes prevent queued torrents to be checked * fixed bug in auto-manager where active_downloads and active_seeds would sometimes be used incorrectly @@ -1723,7 +1723,7 @@ release 0.14.7 ended with a / * fixed bug in error handling when parsing torrent files * fixed file checking bug when renaming a file before checking the torrent - * fixed race conditon when receiving metadata from swarm + * fixed race condition when receiving metadata from swarm * fixed assert in ut_metadata plugin * back-ported some fixes for building with no exceptions * fixed create_torrent when passing in a path ending with / @@ -1816,7 +1816,7 @@ release 0.14.3 * fixed issue where renamed files were sometimes not saved in resume data * accepts tracker responses with no 'peers' field, as long as 'peers6' is present - * fixed CIDR-distance calculation in the precense of IPv6 peers + * fixed CIDR-distance calculation in the presence of IPv6 peers * save partial resume data for torrents that are queued for checking or checking, to maintain stats and renamed files * Don't try IPv6 on windows if it's not installed @@ -1841,7 +1841,7 @@ release 0.14.2 tracker urls * fixed bug where the files requested from web seeds would be the renamed file names instead of the original file names in the torrent. - * documentation fix of queing section + * documentation fix of queueing section * fixed potential issue in udp_socket (affected udp tracker support) * made name, comment and created by also be subject to utf-8 error correction (filenames already were) @@ -1855,7 +1855,7 @@ release 0.14.2 * fixed race condition when saving DHT state * fixed bugs related to lexical_cast being locale dependent * added support for SunPro C++ compiler - * fixed bug where messeges sometimes could be encrypted in the + * fixed bug where messages sometimes could be encrypted in the wrong order, for encrypted connections. * fixed race condition where torrents could get stuck waiting to get checked @@ -1876,7 +1876,7 @@ release 0.14.1 sometimes quit when an error occurred * fixed DHT bug * fixed potential shutdown crash in disk_io_thread - * fixed usage of deprecated boost.filsystem functions + * fixed usage of deprecated boost.filesystem functions * fixed http_connection unit test * fixed bug in DHT when a DHT state was loaded * made rate limiter change in 0.14 optional (to take estimated @@ -1947,7 +1947,7 @@ release 0.14 * Disk cache support. * New, more memory efficient, piece picker with sequential download support (instead of the more complicated sequential download threshold). - * Auto Upload slots. Automtically opens up more slots if + * Auto Upload slots. Automatically opens up more slots if upload limit is not met. * Improved NAT-PMP support by querying the default gateway * Improved UPnP support by ignoring routers not on the clients subnet. @@ -2058,7 +2058,7 @@ release 0.12 * fixed bug in DHT code which would send incorrect announce messages. * fixed bug where the http header parser was case sensitive to the header names. - * Implemented an optmization which frees the piece_picker once a torrent + * Implemented an optimization which frees the piece_picker once a torrent turns into a seed. * Added support for uT peer exchange extension, implemented by Massaroddel. * Modified the quota management to offer better bandwidth balancing @@ -2088,9 +2088,9 @@ release 0.11 * fixed bug with file_progress() with files = 0 bytes * fixed a race condition bug in udp_tracker_connection that could cause a crash. - * fixed bug occuring when increasing the sequenced download threshold + * fixed bug occurring when increasing the sequenced download threshold with max availability lower than previous threshold. - * fixed an integer overflow bug occuring when built with gcc 4.1.x + * fixed an integer overflow bug occurring when built with gcc 4.1.x * fixed crasing bug when closing while checking a torrent * fixed bug causing a crash with a torrent with piece length 0 * added an extension to the DHT network protocol to support the @@ -2156,7 +2156,7 @@ release 0.10 release 0.9.1 - * made the session disable file name checks within the boost.filsystem library + * made the session disable file name checks within the boost.filesystem library * fixed race condition in the sockets * strings that are invalid utf-8 strings are now decoded with the local codepage on windows diff --git a/bindings/python/src/error_code.cpp b/bindings/python/src/error_code.cpp index b947119f583..6e802b34280 100644 --- a/bindings/python/src/error_code.cpp +++ b/bindings/python/src/error_code.cpp @@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace boost { - // this fixe mysterious link error on msvc + // this fixes mysterious link error on msvc template <> inline boost::system::error_category const volatile* get_pointer(class boost::system::error_category const volatile* p) diff --git a/bindings/python/src/gil.hpp b/bindings/python/src/gil.hpp index 59f2f74467e..562ca3c09a5 100644 --- a/bindings/python/src/gil.hpp +++ b/bindings/python/src/gil.hpp @@ -80,7 +80,7 @@ struct visitor : boost::python::def_visitor> F fn; }; -// Member function adaptor that releases and aqcuires the GIL +// Member function adaptor that releases and acquires the GIL // around the function call. template visitor allow_threads(F fn) diff --git a/bindings/python/test.py b/bindings/python/test.py index 0b6aaaddcb7..612006ecac5 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -208,7 +208,7 @@ def test_replace_trackers(self): self.assertEqual(new_trackers[1]['fail_limit'], 2) def test_pickle_trackers(self): - """Test lt objects convertors are working and trackers can be pickled""" + """Test lt objects converters are working and trackers can be pickled""" self.setup() tracker = lt.announce_entry('udp://tracker1.com') tracker.tier = 0 diff --git a/docs/tuning.rst b/docs/tuning.rst index 5eefe4891c2..757e4b0efde 100644 --- a/docs/tuning.rst +++ b/docs/tuning.rst @@ -48,7 +48,7 @@ session_stats_header_alert that will be posted on startup containing the column for all metrics. Logging this line will greatly simplify interpreting the output, and is required for the script to work out-of-the-box. -The python scrip in ``tools/parse_session_stats.py`` can parse the resulting +The python script in ``tools/parse_session_stats.py`` can parse the resulting file and produce graphs of relevant stats. It requires gnuplot_. .. _gnuplot: http://www.gnuplot.info @@ -332,7 +332,7 @@ contributions ============= If you have added instrumentation for some part of libtorrent that is not -covered here, or if you have improved any of the parser scrips, please consider +covered here, or if you have improved any of the parser scripts, please consider contributing it back to the project. If you have run tests and found that some algorithm or default value in diff --git a/docs/upgrade_to_1.2.rst b/docs/upgrade_to_1.2.rst index 0f894957417..c36a118d171 100644 --- a/docs/upgrade_to_1.2.rst +++ b/docs/upgrade_to_1.2.rst @@ -124,7 +124,7 @@ For example, the following expressions are deprecated:: atp.flags = 0; -Insted say:: +Instead say:: if (!(atp.flags & torrent_flags::paused)) diff --git a/examples/connection_tester.cpp b/examples/connection_tester.cpp index 2dfa278d6fd..032df0611e9 100644 --- a/examples/connection_tester.cpp +++ b/examples/connection_tester.cpp @@ -81,7 +81,7 @@ void generate_block(span buffer, piece_index_t const piece // in order to circumvent the restricton of only // one connection per IP that most clients implement // all sockets created by this tester are bound to -// uniqe local IPs in the range (127.0.0.1 - 127.255.255.255) +// unique local IPs in the range (127.0.0.1 - 127.255.255.255) // it's only enabled if the target is also on the loopback int local_if_counter = 0; bool local_bind = false; diff --git a/examples/torrent_view.cpp b/examples/torrent_view.cpp index 68ee1689660..38ace62ae83 100644 --- a/examples/torrent_view.cpp +++ b/examples/torrent_view.cpp @@ -443,8 +443,8 @@ void torrent_view::print_torrent(lt::torrent_status const& s, bool selected) std::array str; lt::span dest(str); - // the active torrent is highligted in the list - // this inverses the forground and background colors + // the active torrent is highlighted in the list + // this inverses the foreground and background colors char const* selection = ""; if (selected) selection = "\x1b[1m\x1b[44m"; diff --git a/include/libtorrent/aux_/io.hpp b/include/libtorrent/aux_/io.hpp index abd44a64224..0edcf0aab98 100644 --- a/include/libtorrent/aux_/io.hpp +++ b/include/libtorrent/aux_/io.hpp @@ -46,7 +46,7 @@ namespace libtorrent { namespace aux { // reads an integer from a byte stream // in big endian byte order and converts - // it to native endianess + // it to native endianness template inline typename std::enable_if::type read_impl(span& view, type) diff --git a/include/libtorrent/aux_/merkle.hpp b/include/libtorrent/aux_/merkle.hpp index 3605c830b71..c30553e4d94 100644 --- a/include/libtorrent/aux_/merkle.hpp +++ b/include/libtorrent/aux_/merkle.hpp @@ -152,7 +152,7 @@ namespace libtorrent { // layer that can be verified, and the root_index is the node that needs to // be known in (tree) to do so. The num_valid_leafs specifies how many of // the leafs that are actually *supposed* to be non-zero. Any leafs beyond - // thses are padding and expected to be zero. + // these are padding and expected to be zero. // The caller must validate the hash at root_index. TORRENT_EXTRA_EXPORT std::tuple merkle_find_known_subtree(span const tree diff --git a/include/libtorrent/aux_/merkle_tree.hpp b/include/libtorrent/aux_/merkle_tree.hpp index c1d6858ab32..3057d2aec5d 100644 --- a/include/libtorrent/aux_/merkle_tree.hpp +++ b/include/libtorrent/aux_/merkle_tree.hpp @@ -176,7 +176,7 @@ struct TORRENT_EXTRA_EXPORT merkle_tree aux::vector m_tree; // when the full tree is allocated, this has one bit for each block hash. a - // 1 means we have verified the block hash to be corret, otherwise the block + // 1 means we have verified the block hash to be correct, otherwise the block // hash may represent what's on disk, but we haven't been able to verify it // yet bitfield m_block_verified; diff --git a/include/libtorrent/aux_/resolver.hpp b/include/libtorrent/aux_/resolver.hpp index fda446527e1..a0eb6b300f4 100644 --- a/include/libtorrent/aux_/resolver.hpp +++ b/include/libtorrent/aux_/resolver.hpp @@ -99,7 +99,7 @@ struct TORRENT_EXTRA_EXPORT resolver final : resolver_interface time_duration m_timeout; // the callbacks to call when a host resolution completes. This allows to - // attach more callbacks if the same host is looked up mutliple times + // attach more callbacks if the same host is looked up multiple times std::multimap m_callbacks; }; diff --git a/include/libtorrent/aux_/resolver_interface.hpp b/include/libtorrent/aux_/resolver_interface.hpp index 891d8314587..9e3c988cc3b 100644 --- a/include/libtorrent/aux_/resolver_interface.hpp +++ b/include/libtorrent/aux_/resolver_interface.hpp @@ -53,7 +53,7 @@ struct TORRENT_EXTRA_EXPORT resolver_interface using callback_t = std::function const&)>; // this flag will make async_resolve() only use the cache and fail if we - // don't have a cache entry, regardless of how old it is. This is usefull + // don't have a cache entry, regardless of how old it is. This is useful // when completing the lookup quickly is more important than accuracy, // like on shutdown static constexpr resolver_flags cache_only = 0_bit; diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 7df1f17ea2e..b32c2c75fb0 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -246,7 +246,7 @@ namespace aux { } // 0 is natpmp 1 is upnp - // the order of these arrays determines the priorty in + // the order of these arrays determines the priority in // which their ports will be announced to peers aux::array tcp_port_mapping; aux::array udp_port_mapping; diff --git a/include/libtorrent/aux_/utp_stream.hpp b/include/libtorrent/aux_/utp_stream.hpp index e37ec32b6e0..f7ce9c869f5 100644 --- a/include/libtorrent/aux_/utp_stream.hpp +++ b/include/libtorrent/aux_/utp_stream.hpp @@ -527,7 +527,7 @@ struct TORRENT_EXTRA_EXPORT utp_stream } #if BOOST_VERSION >= 106600 - // Compatiblity with the async_wait method introduced in boost 1.66 + // Compatibility with the async_wait method introduced in boost 1.66 enum wait_type { wait_read, wait_write, wait_error }; diff --git a/include/libtorrent/io.hpp b/include/libtorrent/io.hpp index 29b3676d2e0..7802e168ab8 100644 --- a/include/libtorrent/io.hpp +++ b/include/libtorrent/io.hpp @@ -49,7 +49,7 @@ namespace aux { // reads an integer from a byte stream // in big endian byte order and converts - // it to native endianess + // it to native endianness template inline T read_impl(InIt& start, type) { diff --git a/include/libtorrent/kademlia/refresh.hpp b/include/libtorrent/kademlia/refresh.hpp index 6f67473ca78..62e426c1d0b 100644 --- a/include/libtorrent/kademlia/refresh.hpp +++ b/include/libtorrent/kademlia/refresh.hpp @@ -61,7 +61,7 @@ class bootstrap : public get_peers }; -} // namesapce dht +} // namespace dht } // namespace libtorrent #endif // REFRESH_050324_HPP diff --git a/include/libtorrent/mmap_storage.hpp b/include/libtorrent/mmap_storage.hpp index 0e42b03973d..e9b6127ebbb 100644 --- a/include/libtorrent/mmap_storage.hpp +++ b/include/libtorrent/mmap_storage.hpp @@ -218,7 +218,7 @@ namespace aux { // serialized on a per-file basis. See github issue #3842 for details. // This array stores a mutex for each file in the storage object - // It must be aquired before calling CreateFileMapping or UnmapViewOfFile + // It must be acquired before calling CreateFileMapping or UnmapViewOfFile mutable std::shared_ptr m_file_open_unmap_lock; #endif diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index 058734bc7a1..ce327a1b786 100644 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -659,7 +659,7 @@ namespace aux { // returns the block currently being // downloaded. And the progress of that // block. If the peer isn't downloading - // a piece for the moment, implementors + // a piece for the moment, implementers // must return an object with the piece_index // value invalid (the default constructor). virtual piece_block_progress downloading_piece_progress() const; diff --git a/include/libtorrent/piece_picker.hpp b/include/libtorrent/piece_picker.hpp index 8612e26bec3..c90158e5578 100644 --- a/include/libtorrent/piece_picker.hpp +++ b/include/libtorrent/piece_picker.hpp @@ -807,8 +807,8 @@ namespace libtorrent { // blocks covered by the pad bytes are not picked by the piece picker std::unordered_map m_pads_in_piece; - // when the adjecent_piece affinity is enabled, this contains the most - // recent "extents" of adjecent pieces that have been requested from + // when the adjacent_piece affinity is enabled, this contains the most + // recent "extents" of adjacent pieces that have been requested from // this is mutable because it's updated by functions to pick pieces, which // are const. That's an efficient place to update it, since it's being // traversed already. diff --git a/include/libtorrent/proxy_base.hpp b/include/libtorrent/proxy_base.hpp index 0c533005505..e3a1f4d4767 100644 --- a/include/libtorrent/proxy_base.hpp +++ b/include/libtorrent/proxy_base.hpp @@ -125,7 +125,7 @@ struct proxy_base } #if BOOST_VERSION >= 106600 && !defined TORRENT_BUILD_SIMULATOR - // Compatiblity with the async_wait method introduced in boost 1.66 + // Compatibility with the async_wait method introduced in boost 1.66 static constexpr auto wait_read = tcp::socket::wait_read; static constexpr auto wait_write = tcp::socket::wait_write; diff --git a/include/libtorrent/socks5_stream.hpp b/include/libtorrent/socks5_stream.hpp index 5e8c11c6490..0459331e452 100644 --- a/include/libtorrent/socks5_stream.hpp +++ b/include/libtorrent/socks5_stream.hpp @@ -127,7 +127,7 @@ class socks5_stream : public proxy_base void set_dst_name(std::string const& host) { - // if this assert trips, set_dst_name() is called wth an IP address rather + // if this assert trips, set_dst_name() is called with an IP address rather // than a hostname. Instead, resolve the IP into an address and pass it to // async_connect instead TORRENT_ASSERT(!aux::is_ip_address(host)); diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 116d264a5a6..ecca52f34ea 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -1023,7 +1023,7 @@ namespace libtorrent { // piece_failed is called when a piece fails the hash check // for failures detected with v2 hashes the failing blocks(s) // are specified in blocks - // *blocks must be sorted in acending order* + // *blocks must be sorted in ascending order* void piece_failed(piece_index_t index, std::vector blocks = std::vector()); // the peers in "peers" participated in sending a bad piece. If @@ -1436,7 +1436,7 @@ namespace libtorrent { // peers. This vector is ordered, to make lookups fast. // TODO: 3 factor out predictive pieces and all operations on it into a - // separate class (to use as memeber here instead) + // separate class (to use as member here instead) std::vector m_predictive_pieces; #endif diff --git a/simulation/disk_io.hpp b/simulation/disk_io.hpp index 4e4911ebf49..9e37d13c835 100644 --- a/simulation/disk_io.hpp +++ b/simulation/disk_io.hpp @@ -100,7 +100,7 @@ struct test_disk std::unique_ptr operator()( lt::io_context& ioc, lt::settings_interface const&, lt::counters&); - // seek time in fron of every read and write + // seek time in front of every read and write lt::time_duration seek_time = lt::milliseconds(10); // hash time per block diff --git a/simulation/test_file_pool.cpp b/simulation/test_file_pool.cpp index 94a797babdb..dc7d641f92f 100644 --- a/simulation/test_file_pool.cpp +++ b/simulation/test_file_pool.cpp @@ -77,7 +77,7 @@ TORRENT_TEST(close_file_interval) } else if (ticks > 21) { - // the close file timer shuold have kicked in at 20 seconds + // the close file timer should have kicked in at 20 seconds // and closed the file TEST_EQUAL(file_status.size(), 0); } diff --git a/simulation/test_http_connection.cpp b/simulation/test_http_connection.cpp index 30fb0aa5bcf..69833e27db2 100644 --- a/simulation/test_http_connection.cpp +++ b/simulation/test_http_connection.cpp @@ -274,7 +274,7 @@ void run_suite(lt::aux::proxy_settings ps) { // this hostname will resolve to multiple IPs, all but one that we cannot // connect to and the second one where we'll get the test file response. Make - // sure the http_connection correcly tries the second IP if the first one + // sure the http_connection correctly tries the second IP if the first one // fails. run_test(ps, "http://try-next.com:8080/test_file", 1337, 200 , error_condition(), { 1, 1, 1}); diff --git a/simulation/test_socks5.cpp b/simulation/test_socks5.cpp index ad0adda0bbb..be99ab91e67 100644 --- a/simulation/test_socks5.cpp +++ b/simulation/test_socks5.cpp @@ -299,7 +299,7 @@ TORRENT_TEST(socks5_udp_retry) lt::session_proxy zombie; sim::asio::io_context proxy_ios{sim, addr("50.50.50.50") }; - // close UDP associate connectons prematurely + // close UDP associate connections prematurely sim::socks_server socks5(proxy_ios, 5555, 5, socks_flag::disconnect_udp_associate); lt::settings_pack pack = settings(); diff --git a/simulation/test_swarm.cpp b/simulation/test_swarm.cpp index 73a290c4346..814dcc4df9d 100644 --- a/simulation/test_swarm.cpp +++ b/simulation/test_swarm.cpp @@ -478,7 +478,7 @@ struct nat_config : sim::default_config sim::route outgoing_route(lt::address ip) override { - // This is extremely simplistic. It will simply alter the percieved source + // This is extremely simplistic. It will simply alter the perceived source // IP of the connecting client. sim::route r; if (ip == addr("50.0.0.1")) r.append(m_nat_hop); diff --git a/simulation/test_timeout.cpp b/simulation/test_timeout.cpp index 5305a159268..5affa5ea93f 100644 --- a/simulation/test_timeout.cpp +++ b/simulation/test_timeout.cpp @@ -241,7 +241,7 @@ disconnects_t test_no_interest_timeout(int const num_peers } // if a peer is not interested in us, and we're not interested in it for long -// enoguh, we disconenct it, but only if we are close to peer connection capacity +// enough, we disconnect it, but only if we are close to peer connection capacity TORRENT_TEST(no_interest_timeout) { // with 10 peers, we're close enough to the connection limit to enable diff --git a/simulation/test_torrent_status.cpp b/simulation/test_torrent_status.cpp index b4296e561c9..77c37f59a8b 100644 --- a/simulation/test_torrent_status.cpp +++ b/simulation/test_torrent_status.cpp @@ -128,7 +128,7 @@ TORRENT_TEST(status_timers_last_upload) TEST_CHECK(!handle.is_valid()); handle = ta->handle; torrent_status st = handle.status(); - // test last upload and download state before wo go throgh + // test last upload and download state before we go through // torrent states TEST_CHECK(st.last_upload == time_point(seconds(0))); TEST_CHECK(st.last_download == time_point(seconds(0))); @@ -174,7 +174,7 @@ TORRENT_TEST(status_timers_time_shift_with_active_torrent) TEST_CHECK(!handle.is_valid()); handle = ta->handle; torrent_status st = handle.status(); - // test last upload and download state before wo go throgh + // test last upload and download state before we go through // torrent states TEST_CHECK(st.last_download == time_point(seconds(0))); TEST_CHECK(st.last_upload == time_point(seconds(0))); @@ -201,9 +201,9 @@ TORRENT_TEST(status_timers_time_shift_with_active_torrent) break; case 64000: // resume just before we hit the time shift handling - // this is needed to test what happend if we want to + // this is needed to test what happens if we want to // shift more time then we have active time because - // we shift 4 hours and have less then 1 hours active time + // we shift 4 hours and have less then 1 hour active time handle.resume(); tick_is_in_active_range = true; // don't check every tick @@ -253,7 +253,7 @@ TORRENT_TEST(finish_time_shift_active) TEST_CHECK(!handle.is_valid()); handle = ta->handle; torrent_status st = handle.status(); - // test last upload and download state before wo go throgh + // test last upload and download state before we go through // torrent states TEST_CHECK(st.last_download == time_point(seconds(0))); TEST_CHECK(st.last_upload == time_point(seconds(0))); @@ -325,7 +325,7 @@ TORRENT_TEST(finish_time_shift_paused) TEST_CHECK(!handle.is_valid()); handle = ta->handle; torrent_status st = handle.status(); - // test last upload and download state before wo go throgh + // test last upload and download state before we go through // torrent states TEST_CHECK(st.last_upload == time_point(seconds(0))); TEST_CHECK(st.last_download == time_point(seconds(0))); diff --git a/simulation/test_utp.cpp b/simulation/test_utp.cpp index 5f991d0f10b..4780fed0ef1 100644 --- a/simulation/test_utp.cpp +++ b/simulation/test_utp.cpp @@ -110,7 +110,7 @@ std::vector utp_test(sim::configuration& cfg, int send_buffer_size } // TODO: 3 simulate non-congestive packet loss -// TODO: 3 simulate unpredictible latencies +// TODO: 3 simulate unpredictable latencies // TODO: 3 simulate proper (taildrop) queues (perhaps even RED and BLUE) // The counters checked by these tests are proxies for the expected behavior. If diff --git a/src/bdecode.cpp b/src/bdecode.cpp index f8aeca26e3d..0deec874a83 100644 --- a/src/bdecode.cpp +++ b/src/bdecode.cpp @@ -150,7 +150,7 @@ namespace aux { - // reads the string between start and end, or up to the first occurrance of + // reads the string between start and end, or up to the first occurrence of // 'delimiter', whichever comes first. This string is interpreted as an // integer which is assigned to 'val'. If there's a non-delimiter and // non-digit in the range, a parse error is reported in 'ec'. If the value diff --git a/src/choker.cpp b/src/choker.cpp index cc204fc13b9..297ec1653eb 100644 --- a/src/choker.cpp +++ b/src/choker.cpp @@ -70,7 +70,7 @@ namespace { int const cmp = compare_peers(lhs, rhs); if (cmp != 0) return cmp > 0; - // when seeding, rotate which peer is unchoked in a round-robin fasion + // when seeding, rotate which peer is unchoked in a round-robin fashion // the amount uploaded since unchoked (not just in the last round) std::int64_t const u1 = lhs->uploaded_since_unchoked(); diff --git a/src/enum_net.cpp b/src/enum_net.cpp index 4ae73cf0389..22e9088435b 100644 --- a/src/enum_net.cpp +++ b/src/enum_net.cpp @@ -299,7 +299,7 @@ namespace { if (::send(sock, request_msg, request_msg->nlmsg_len, 0) < 0) return -1; - // get the socket's port ID so that we can verify it in the repsonse + // get the socket's port ID so that we can verify it in the response sockaddr_nl sock_addr; socklen_t sock_addr_len = sizeof(sock_addr); if (::getsockname(sock, reinterpret_cast(&sock_addr), &sock_addr_len) < 0) diff --git a/src/file_storage.cpp b/src/file_storage.cpp index 36f181b8b3b..37dd153f996 100644 --- a/src/file_storage.cpp +++ b/src/file_storage.cpp @@ -1226,7 +1226,7 @@ namespace { TORRENT_ASSERT(piece_length() >= 16 * 1024); // use this vector to track the new ordering of files - // this allows the use of STL algorthims despite them + // this allows the use of STL algorithms despite them // not supporting a custom swap functor aux::vector new_order(end_file()); for (auto i : file_range()) @@ -1246,7 +1246,7 @@ namespace { std::sort(new_order.begin(), new_order.end() , [this](file_index_t l, file_index_t r) { - // assuming m_paths are unqiue! + // assuming m_paths are unique! auto const& lf = m_files[l]; auto const& rf = m_files[r]; if (lf.path_index != rf.path_index) diff --git a/src/file_view_pool.cpp b/src/file_view_pool.cpp index 8fc550357b7..b56d33fb3a6 100644 --- a/src/file_view_pool.cpp +++ b/src/file_view_pool.cpp @@ -277,7 +277,7 @@ namespace libtorrent { namespace aux { } catch (storage_error& se) { - // opening the file failed. If it was becase the directory was + // opening the file failed. If it was because the directory was // missing, create it and try again. Otherwise, propagate the // error if (!(m & open_mode::write) diff --git a/src/gzip.cpp b/src/gzip.cpp index c09087d167a..9757dd7fe6d 100644 --- a/src/gzip.cpp +++ b/src/gzip.cpp @@ -128,7 +128,7 @@ namespace { int const method = buffer[2]; int const flags = buffer[3]; - // check for reserved flag and make sure it's compressed with the correct metod + // check for reserved flag and make sure it's compressed with the correct method // we only support deflate if (method != 8 || (flags & FRESERVED) != 0) return -1; diff --git a/src/ip_notifier.cpp b/src/ip_notifier.cpp index 15a05836552..5b2666a3b1e 100644 --- a/src/ip_notifier.cpp +++ b/src/ip_notifier.cpp @@ -172,7 +172,7 @@ struct ip_change_notifier_impl final : ip_change_notifier int family; std::array data; }; - // maps if_index to the most recently advertized local address + // maps if_index to the most recently advertised local address // this is used to filter duplicate updates std::unordered_map m_state; diff --git a/src/merkle_tree.cpp b/src/merkle_tree.cpp index 0fc8afe41d1..ccf9bc68a4f 100644 --- a/src/merkle_tree.cpp +++ b/src/merkle_tree.cpp @@ -159,7 +159,7 @@ namespace { TORRENT_ASSERT(first_piece < int(mask.size())); TORRENT_ASSERT(end_piece <= int(mask.size())); - // if the mask convers all pieces, and nothing below that layer, go + // if the mask covers all pieces, and nothing below that layer, go // straight to piece_layer mode and validate if (std::all_of(mask.begin() + first_piece, mask.begin() + end_piece, identity()) diff --git a/src/mmap_disk_io.cpp b/src/mmap_disk_io.cpp index 9cc6600dd20..7e9ddb5352d 100644 --- a/src/mmap_disk_io.cpp +++ b/src/mmap_disk_io.cpp @@ -1021,7 +1021,7 @@ TORRENT_EXPORT std::unique_ptr mmap_disk_io_constructor( // TODO: Perhaps the job queue could be traversed and all jobs for this // piece could be cancelled. If there are no threads currently writing - // to this piece, we could skip the fence alltogether + // to this piece, we could skip the fence altogether add_fence_job(j); } diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 839e196eb08..c37a5e95ba3 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -5523,7 +5523,7 @@ namespace libtorrent { { case set_block_hash_result::block_hash_failed: // If the hash failed immediately at the leaf layer it means that - // the chuck hash is known so this peer definately sent bad data. + // the chuck hash is known so this peer definitely sent bad data. t->piece_failed(r.piece, std::vector{r.start / default_block_size}); TORRENT_ASSERT(m_disconnecting); return; diff --git a/src/peer_list.cpp b/src/peer_list.cpp index 2fbc4ddf509..5962078e917 100644 --- a/src/peer_list.cpp +++ b/src/peer_list.cpp @@ -466,7 +466,7 @@ namespace libtorrent { const bool was_conn_cand = is_connect_candidate(*p); p->connection = c; - // now that we're connected, no need to assume ther peer is a seed + // now that we're connected, no need to assume the peer is a seed // anymore. We'll soon know. p->maybe_upload_only = false; if (was_conn_cand) update_connect_candidates(-1); diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 0b172146c1b..fb8819db435 100644 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -3113,7 +3113,7 @@ namespace { void piece_picker::record_downloading_piece(piece_index_t const p) { // if a single piece is large enough, don't bother with the affinity of - // adjecent pieces. + // adjacent pieces. if (blocks_per_piece() >= max_piece_affinity_extent) return; piece_extent_t const this_extent = extent_for(p); @@ -3137,7 +3137,7 @@ namespace { // if at least one piece in this extent has a different priority than // the one we just started downloading, don't create an affinity for - // adjecent pieces. This probably means the pieces belong to different + // adjacent pieces. This probably means the pieces belong to different // files, or that some other mechanism determining the priority should // take precedence. if (piece_priority(piece) != this_prio) return; @@ -3153,7 +3153,7 @@ namespace { // limit the number of extent affinities active at any given time to limit // the cost of checking them. Also, don't replace them, commit to - // finishing them before starting another extent. This is analoguous to + // finishing them before starting another extent. This is analogous to // limiting the number of partial pieces. } @@ -3191,12 +3191,12 @@ namespace { if (prio >= 0 && !m_dirty) update(prio, p.index); // if the piece extent affinity is enabled, (maybe) record downloading a - // block from this piece to make other peers prefer adjecent pieces + // block from this piece to make other peers prefer adjacent pieces // if reverse is set, don't encourage other peers to pick nearby // pieces, as that's assumed to be low priority. // if time critical mode is enabled, we're likely to either download // adjacent pieces anyway, but more importantly, we don't want to - // create artificially higher priority for adjecent pieces if they + // create artificially higher priority for adjacent pieces if they // aren't important or urgent if (options & piece_extent_affinity) record_downloading_piece(block.piece_index); diff --git a/src/puff.cpp b/src/puff.cpp index d100416d8eb..14fd66a242b 100644 --- a/src/puff.cpp +++ b/src/puff.cpp @@ -628,7 +628,7 @@ local int fixed(struct state *s) * are themselves compressed using Huffman codes and run-length encoding. In * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means * that length, and the symbols 16, 17, and 18 are run-length instructions. - * Each of 16, 17, and 18 are follwed by extra bits to define the length of + * Each of 16, 17, and 18 are followed by extra bits to define the length of * the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10 * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols * are common, hence the special coding for zero lengths. diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 9b6bf96af44..822ff9953b6 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -2613,7 +2613,7 @@ namespace { span const buf = packet.data; if (!packet.hostname.empty()) { - // only the tracker manager supports receiveing UDP packets + // only the tracker manager supports receiving UDP packets // from hostnames. If it won't handle it, no one else will // either m_tracker_manager.incoming_packet(packet.hostname, buf); @@ -3736,7 +3736,7 @@ namespace { // has reached its local limit for (auto const& t : m_torrents) { - // ths disconnect logic is disabled for torrents with + // this disconnect logic is disabled for torrents with // too low connection limit int const max = std::min(t->max_connections() , std::numeric_limits::max() / 100); diff --git a/src/session_stats.cpp b/src/session_stats.cpp index bbc179ce61c..6bbe196b3a4 100644 --- a/src/session_stats.cpp +++ b/src/session_stats.cpp @@ -520,7 +520,7 @@ namespace { // the buffer sizes accepted by // socket send and receive calls respectively. // The larger the buffers are, the more efficient, - // because it reqire fewer system calls per byte. + // because it require fewer system calls per byte. // The size is 1 << n, where n is the number // at the end of the counter name. i.e. // 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, diff --git a/src/sha1.cpp b/src/sha1.cpp index ec314b93328..78424ab6624 100644 --- a/src/sha1.cpp +++ b/src/sha1.cpp @@ -205,8 +205,8 @@ void SHA1_update(sha1_ctx* context, u8 const* data, size_t len) #elif BOOST_ENDIAN_LITTLE_BYTE internal_update(context, data, len); #else - // select different functions depending on endianess - // and figure out the endianess runtime + // select different functions depending on endianness + // and figure out the endianness runtime if (is_big_endian()) internal_update(context, data, len); else @@ -307,9 +307,9 @@ By Arvid Norberg 2- uses C99 types with size guarantees from boost 3- if none of BOOST_BIG_ENDIAN or BOOST_LITTLE_ENDIAN - are defined, endianess is determined + are defined, endianness is determined at runtime. templates are used to duplicate - the transform function for each endianess + the transform function for each endianness 4- using anonymous namespace to avoid external linkage on internal functions 5- using standard C++ includes diff --git a/src/time.cpp b/src/time.cpp index e58d52b323f..23ea3928b3d 100644 --- a/src/time.cpp +++ b/src/time.cpp @@ -39,7 +39,7 @@ namespace libtorrent { namespace aux { time_point time_now() { return clock_type::now(); } time_point32 time_now32() { return time_point_cast(clock_type::now()); } - // for simplying implementation + // for simplifying implementation using std::chrono::system_clock; diff --git a/src/torrent.cpp b/src/torrent.cpp index e99dfc63318..43e2cddea18 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -7205,7 +7205,7 @@ namespace { ret.verified_leaf_hashes.reserve(num_files); for (auto const& t : m_merkle_trees) { - // use stuctured binding in C++17 + // use structured binding in C++17 aux::vector mask; std::vector sparse_tree; std::tie(sparse_tree, mask) = t.build_sparse_vector(); @@ -9088,7 +9088,7 @@ namespace { void torrent::set_max_uploads(int limit, bool const state_update) { TORRENT_ASSERT(is_single_thread()); - // TODO: perhaps 0 should actially mean 0 + // TODO: perhaps 0 should actually mean 0 if (limit <= 0) limit = (1 << 24) - 1; if (int(m_max_uploads) == limit) return; if (state_update) state_updated(); @@ -9105,7 +9105,7 @@ namespace { void torrent::set_max_connections(int limit, bool const state_update) { TORRENT_ASSERT(is_single_thread()); - // TODO: perhaps 0 should actially mean 0 + // TODO: perhaps 0 should actually mean 0 if (limit <= 0) limit = (1 << 24) - 1; if (int(m_max_connections) == limit) return; if (state_update) state_updated(); diff --git a/src/ut_metadata.cpp b/src/ut_metadata.cpp index 25b351e0160..205b9521753 100644 --- a/src/ut_metadata.cpp +++ b/src/ut_metadata.cpp @@ -76,7 +76,7 @@ namespace { send_buffer_limit = 0x4000 * 10, // this is the max number of requests we'll queue - // up. If we get more requests tha this, we'll + // up. If we get more requests than this, we'll // start rejecting them, claiming we don't have // metadata. If the torrent is greater than 16 MiB, // we may hit this case (and the client requesting diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index f55e4e22510..e2b40c896b3 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -259,7 +259,7 @@ void utp_socket_impl::update_mtu_limits() m_mtu_ceiling = m_mtu_floor; // the path MTU may have changed. Perform another search - // dont' start all the way from start, just half way down. + // don't start all the way from start, just half way down. m_mtu_floor = ((TORRENT_INET_MIN_MTU - TORRENT_IPV4_HEADER - TORRENT_UDP_HEADER) + m_mtu_ceiling) / 2; UTP_LOGV("%8p: reducing MTU floor\n", static_cast(this)); @@ -2324,7 +2324,7 @@ bool utp_socket_impl::consume_incoming_data( // number of queued up bytes, waiting for the upper layer, // exceeds the advertised receive window, start ignoring // more data packets - UTP_LOG("%8p: ERROR: our advertized window is not honored. " + UTP_LOG("%8p: ERROR: our advertised window is not honored. " "recv_buf: %d buffered_in: %d max_size: %d\n" , static_cast(this), m_receive_buffer_size, m_buffered_incoming_bytes, m_receive_buffer_capacity); return false; @@ -3304,7 +3304,7 @@ void utp_socket_impl::do_ledbat(const int acked_bytes, const int delay { m_slow_start = false; m_ssthres = (m_cwnd >> 16); - UTP_LOGV("%8p: cwnd > advertized wnd (%u) slow_start -> 0\n" + UTP_LOGV("%8p: cwnd > advertised wnd (%u) slow_start -> 0\n" , static_cast(this), m_adv_wnd); } */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 26d58e6b0bd..22563c5d8c8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) # Configurable policies: <= CMP0097 -# Our tests contain printf formating checks therefore we disable GCC format string errors: +# Our tests contain printf formatting checks therefore we disable GCC format string errors: if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") check_cxx_compiler_flag("-Wno-error=format-truncation" _WNO_ERROR_FORMAT_TRUNCATION) if (_WNO_ERROR_FORMAT_TRUNCATION) diff --git a/test/http_proxy.py b/test/http_proxy.py index 6e076958d3e..f80f57ed7a6 100755 --- a/test/http_proxy.py +++ b/test/http_proxy.py @@ -44,7 +44,7 @@ def read_to_end_of_chunks(file_like): """Reads a chunked-encoded stream from a file-like object. This will read up to the end of the chunked encoding, including chunk - delimeters, trailers, and the terminal empty line. + delimiters, trailers, and the terminal empty line. The stream will be returned as an iterator of bytes objects. The split between bytes objects is arbitrary. diff --git a/test/main.cpp b/test/main.cpp index 59c5fc69600..e10fd944542 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -53,7 +53,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #ifdef _WIN32 -#include "libtorrent/aux_/windows.hpp" // fot SetErrorMode +#include "libtorrent/aux_/windows.hpp" // for SetErrorMode #include // for _dup and _dup2 #include // for _getpid #include diff --git a/test/test_bdecode.cpp b/test/test_bdecode.cpp index 8ea03102de3..4a93f7c6af9 100644 --- a/test/test_bdecode.cpp +++ b/test/test_bdecode.cpp @@ -1201,7 +1201,7 @@ TORRENT_TEST(non_owning_refs) } // test that a partial parse can be still be printed up to the -// point where it faild +// point where it failed TORRENT_TEST(partial_parse) { char b[] = "d1:ai1e1:b3:foo1:cli1ei2ee1:dd1:xi1-eee"; diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 9cd566c26ae..093e15cf1e3 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -305,7 +305,7 @@ void send_dht_request(node& node, char const* msg, udp::endpoint const& ep { if (i == g_sent_packets.end()) { - TEST_ERROR("not response from DHT node"); + TEST_ERROR("no response from DHT node"); return; } @@ -3215,7 +3215,7 @@ TORRENT_TEST(read_only_node) sett.set_bool(settings_pack::dht_read_only, false); send_dht_request(node, "get", source, &response); - // sender should be added to repacement bucket + // sender should be added to replacement bucket TEST_EQUAL(std::get<1>(node.size()), 1); g_sent_packets.clear(); diff --git a/test/test_http_parser.cpp b/test/test_http_parser.cpp index 12a2d03463b..76f091d6774 100644 --- a/test/test_http_parser.cpp +++ b/test/test_http_parser.cpp @@ -749,7 +749,7 @@ TORRENT_TEST(missing_chunked_header) "\r\n" "\n"; - // make the inpout not be null terminated. If the parser reads off the end, + // make the input not be null terminated. If the parser reads off the end, // address sanitizer will trigger char chunked_input[sizeof(input)-1]; std::memcpy(chunked_input, input, sizeof(chunked_input)); diff --git a/test/test_peer_list.cpp b/test/test_peer_list.cpp index d101fbf9297..85e6d333657 100644 --- a/test/test_peer_list.cpp +++ b/test/test_peer_list.cpp @@ -388,7 +388,7 @@ TORRENT_TEST(update_peer_port) } // test incoming connection -// and update_peer_port, causing collission +// and update_peer_port, causing collision TORRENT_TEST(update_peer_port_collide) { torrent_state st = init_state(); diff --git a/test/test_piece_picker.cpp b/test/test_piece_picker.cpp index 427593ae60e..9b8f3b3d215 100644 --- a/test/test_piece_picker.cpp +++ b/test/test_piece_picker.cpp @@ -437,7 +437,7 @@ TORRENT_TEST(get_downloaders) } // if we ask for downloaders for a piece that's not - // curently being downloaded, we get zeroes back + // currently being downloaded, we get zeroes back { std::vector d = p->get_downloaders(1_piece); @@ -1281,7 +1281,7 @@ TORRENT_TEST(picking_downloading_blocks) // don't pick both busy pieces, if there are already other blocks picked TEST_EQUAL(picked.size(), 7 * blocks_per_piece - 2); - // make sure we still pick from a partial piece even when prefering whole pieces + // make sure we still pick from a partial piece even when preferring whole pieces picked.clear(); p->pick_pieces(string2vec(" * "), picked, 1, blocks_per_piece, nullptr , piece_picker::rarest_first @@ -1575,7 +1575,7 @@ TORRENT_TEST(bitfield_optimization) TORRENT_TEST(seed_optimization) { - // test seed optimizaton + // test seed optimization auto p = setup_picker("0000000000000000", " ", "", ""); // make sure it's not dirty @@ -2717,7 +2717,7 @@ TORRENT_TEST(piece_extent_affinity_large_pieces) TORRENT_TEST(piece_extent_affinity_active_limit) { // an extent is two pieces wide, 6 extents total. - // make ure we limit the number of extents to 5 + // make sure we limit the number of extents to 5 int const blocks = 128; auto const have_none = " "; diff --git a/test/test_privacy.cpp b/test/test_privacy.cpp index 60e989b7c66..365dbd23718 100644 --- a/test/test_privacy.cpp +++ b/test/test_privacy.cpp @@ -115,7 +115,7 @@ session_proxy test_proxy(settings_pack::proxy_type_t proxy_type, flags_t flags) sett.set_bool(settings_pack::enable_outgoing_utp, false); // in non-anonymous mode we circumvent/ignore the proxy if it fails - // wheras in anonymous mode, we just fail + // whereas in anonymous mode, we just fail sett.set_str(settings_pack::proxy_hostname, "non-existing.com"); sett.set_int(settings_pack::proxy_type, proxy_type); sett.set_bool(settings_pack::proxy_peer_connections, !(flags & dont_proxy_peers)); diff --git a/test/test_remap_files.cpp b/test/test_remap_files.cpp index d7faea366f2..51f58631a9a 100644 --- a/test/test_remap_files.cpp +++ b/test/test_remap_files.cpp @@ -173,7 +173,7 @@ void test_remap_files(storage_mode_t storage_mode = storage_mode_sparse) TEST_CHECK(all_of(files)); TEST_CHECK(all_of(passed)); - // just because we can read them back throught libtorrent, doesn't mean the + // just because we can read them back through libtorrent, doesn't mean the // files have hit disk yet (because of the cache). Retry a few times to try // to pick up the files for (auto i = 0_file; i < file_index_t(int(remap_file_sizes.size())); ++i) diff --git a/test/test_resume.cpp b/test/test_resume.cpp index db41725de08..6aad19e6764 100644 --- a/test/test_resume.cpp +++ b/test/test_resume.cpp @@ -1756,7 +1756,7 @@ TORRENT_TEST(unfinished_pieces_check_all) TORRENT_TEST(unfinished_pieces_finished) { - // make sure that a piece that isn't maked as "have", but whose blocks are + // make sure that a piece that isn't marked as "have", but whose blocks are // all downloaded gets checked and turn into "have". test_unfinished_pieces([](torrent_info const& ti, add_torrent_params& atp) { @@ -1767,7 +1767,7 @@ TORRENT_TEST(unfinished_pieces_finished) TORRENT_TEST(unfinished_pieces_all_finished) { - // make sure that a piece that isn't maked as "have", but whose blocks are + // make sure that a piece that isn't marked as "have", but whose blocks are // all downloaded gets checked and turn into "have". test_unfinished_pieces([](torrent_info const& ti, add_torrent_params& atp) { diff --git a/test/test_similar_torrent.cpp b/test/test_similar_torrent.cpp index 676ba2b79ca..36bb5e8dca4 100644 --- a/test/test_similar_torrent.cpp +++ b/test/test_similar_torrent.cpp @@ -285,7 +285,7 @@ TORRENT_TEST(shared_files_seed_mode_v1) TORRENT_TEST(shared_files_seed_mode_v1_no_files) { - // no files on disk, just an (incorrect) promise of beeing in seed mode + // no files on disk, just an (incorrect) promise of being in seed mode // creating the hard links will fail TEST_CHECK(test(st::no_files | st::seed_mode, v1 | canon, v1 | canon) == bools({false, false})); } diff --git a/test/test_ssl.cpp b/test/test_ssl.cpp index cc22946bd2e..833a4b1c412 100644 --- a/test/test_ssl.cpp +++ b/test/test_ssl.cpp @@ -306,8 +306,8 @@ void test_ssl(int const test_idx, bool const use_utp) } std::string const now = time_now_string(); - std::printf("%s: EXPECT: %s\n", now.c_str(), test.expected_to_complete ? "SUCCEESS" : "FAILURE"); - std::printf("%s: RESULT: %s\n", now.c_str(), tor2.status().is_seeding ? "SUCCEESS" : "FAILURE"); + std::printf("%s: EXPECT: %s\n", now.c_str(), test.expected_to_complete ? "SUCCESS" : "FAILURE"); + std::printf("%s: RESULT: %s\n", now.c_str(), tor2.status().is_seeding ? "SUCCESS" : "FAILURE"); TEST_EQUAL(tor2.status().is_seeding, test.expected_to_complete); // this allows shutting down the sessions in parallel diff --git a/test/test_storage.cpp b/test/test_storage.cpp index 46363f0e5d2..6a966a6b8f3 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -852,7 +852,7 @@ void test_fastresume(bool const test_deprecated) p.storage_mode = storage_mode_sparse; torrent_handle h = ses.add_torrent(std::move(p), ec); - std::printf("expecting fastresume to be rejected becase the files were removed"); + std::printf("expecting fastresume to be rejected because the files were removed"); alert const* a = wait_for_alert(ses, fastresume_rejected_alert::alert_type , "ses"); // we expect the fast resume to be rejected because the files were removed @@ -1323,7 +1323,7 @@ TORRENT_TEST(readwrite_zero_size_files) template void test_move_storage_to_self() { - // call move_storage with the path to the exising storage. should be a no-op + // call move_storage with the path to the existing storage. should be a no-op std::string const save_path = current_working_directory(); std::string const test_path = complete("temp_storage"); delete_dirs(test_path); diff --git a/test/test_string.cpp b/test/test_string.cpp index 1e8e50f0165..f5c0b513037 100644 --- a/test/test_string.cpp +++ b/test/test_string.cpp @@ -224,7 +224,7 @@ std::string to_str(std::vector const& v) return std::string(v.begin(), v.end()); } -// convert the standard base64 alphabet to the i2p aphabet +// convert the standard base64 alphabet to the i2p alphabet std::string transcode_alphabet(std::string in) { std::string ret; diff --git a/test/test_torrent_info.cpp b/test/test_torrent_info.cpp index eba46eb5325..2c0f9d3d190 100644 --- a/test/test_torrent_info.cpp +++ b/test/test_torrent_info.cpp @@ -1132,7 +1132,7 @@ std::vector> const test_cases {"test/temporary.txt", 0x4000, {}, "test/temporary.txt"}, {"test/Temporary.txt", 0x4000, {}, "test/Temporary.1.txt"}, {"test/TeMPorArY.txT", 0x4000, {}, "test/TeMPorArY.2.txT"}, - // a file with the same name in a seprate directory is fine + // a file with the same name in a separate directory is fine {"test/test/TEMPORARY.TXT", 0x4000, {}, "test/test/TEMPORARY.TXT"}, }, { diff --git a/test/test_tracker.cpp b/test/test_tracker.cpp index f46f011eb63..5092141fa25 100644 --- a/test/test_tracker.cpp +++ b/test/test_tracker.cpp @@ -644,7 +644,7 @@ TORRENT_TEST(tracker_proxy) namespace { void test_stop_tracker_timeout(int const timeout) { - // trick the min interval so that the stopped anounce is permitted immediately + // trick the min interval so that the stopped announce is permitted immediately // after the initial announce int port = start_web_server(false, false, true, -1); From 42ca8851cb1d6b629b39b9a0e08d76f275388527 Mon Sep 17 00:00:00 2001 From: thrnz Date: Wed, 31 May 2023 17:19:55 +1200 Subject: [PATCH 09/29] Schedule DHT announces using milliseconds rather than seconds. This allows dht_announce_interval to be followed more accurately regardless of the total number of torrents --- src/session_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 822ff9953b6..1e1c34e6640 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -6597,7 +6597,7 @@ namespace { } ADD_OUTSTANDING_ASYNC("session_impl::on_dht_announce"); - int delay = std::max(m_settings.get_int(settings_pack::dht_announce_interval) + int delay = std::max(1000 * m_settings.get_int(settings_pack::dht_announce_interval) / std::max(int(m_torrents.size()), 1), 1); if (!m_dht_torrents.empty()) @@ -6605,10 +6605,10 @@ namespace { // we have prioritized torrents that need // an initial DHT announce. Don't wait too long // until we announce those. - delay = std::min(4, delay); + delay = std::min(4000, delay); } - m_dht_announce_timer.expires_after(seconds(delay)); + m_dht_announce_timer.expires_after(milliseconds(delay)); m_dht_announce_timer.async_wait([this](error_code const& e) { wrap(&session_impl::on_dht_announce, e); }); #endif From c16c8dc162771dec27a69a31bcc87c39d783a6ba Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 08:03:52 +0200 Subject: [PATCH 10/29] suppress new GCC warning from 3rd party code (openssl) --- include/libtorrent/aux_/disable_warnings_push.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/libtorrent/aux_/disable_warnings_push.hpp b/include/libtorrent/aux_/disable_warnings_push.hpp index 4ee039ec33f..6ef8303500e 100644 --- a/include/libtorrent/aux_/disable_warnings_push.hpp +++ b/include/libtorrent/aux_/disable_warnings_push.hpp @@ -63,6 +63,9 @@ POSSIBILITY OF SUCH DAMAGE. #if __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Wdeprecated-copy" #endif +#if __GNUC__ >= 12 +#pragma GCC diagnostic ignored "-Woverflow" +#endif #endif #ifdef __clang__ From 740d2eeba6905399c2e660224019bf962a8f39cd Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 08:10:30 +0200 Subject: [PATCH 11/29] update FreeBSD dependency on boost_build to boost-build --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 0ca696ec2b8..fc6fb988cd0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ freebsd_instance: task: install_script: | IGNORE_OSVERSION=yes pkg update - pkg install -U -y git boost_build boost-libs unzip wget openssl cmake ninja + pkg install -U -y git boost-build boost-libs unzip wget openssl cmake ninja echo "using clang ;" > ~/user-config.jam submodules_script: | git submodule update --init --recursive From 07698b693fd2b5b5656d0c14435bbcf20d9b502e Mon Sep 17 00:00:00 2001 From: luzpaz Date: Thu, 24 Aug 2023 06:26:31 -0400 Subject: [PATCH 12/29] README: Remove LGTM badges LGTM was sunset in December 2022 https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ --- README.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.rst b/README.rst index b45fb29f67f..207b248cab3 100644 --- a/README.rst +++ b/README.rst @@ -18,18 +18,12 @@ .. image:: https://api.cirrus-ci.com/github/arvidn/libtorrent.svg?branch=RC_2_0 :target: https://cirrus-ci.com/github/arvidn/libtorrent -.. image:: https://img.shields.io/lgtm/alerts/g/arvidn/libtorrent.svg?logo=lgtm&logoWidth=18 - :target: https://lgtm.com/projects/g/arvidn/libtorrent/alerts/ - .. image:: https://oss-fuzz-build-logs.storage.googleapis.com/badges/libtorrent.svg :target: https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&q=proj%3Alibtorrent&can=1 .. image:: https://codecov.io/github/arvidn/libtorrent/coverage.svg?branch=RC_2_0 :target: https://codecov.io/github/arvidn/libtorrent?branch=RC_2_0&view=all#sort=missing&dir=desc -.. image:: https://img.shields.io/lgtm/grade/cpp/g/arvidn/libtorrent.svg?logo=lgtm&logoWidth=18 - :target: https://lgtm.com/projects/g/arvidn/libtorrent/context:cpp - .. image:: https://www.openhub.net/p/rasterbar-libtorrent/widgets/project_thin_badge.gif :target: https://www.openhub.net/p/rasterbar-libtorrent From 267fabc32ed4cc8272826ccc0cb294b43b2f32bd Mon Sep 17 00:00:00 2001 From: Lwxiang Date: Tue, 27 Jun 2023 19:36:04 +0800 Subject: [PATCH 13/29] FIX(peer_list): clear the m_candidate_cache when clear peer_list, and set m_num_seeds to 0 --- src/peer_list.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/peer_list.cpp b/src/peer_list.cpp index 5962078e917..1786a2b5308 100644 --- a/src/peer_list.cpp +++ b/src/peer_list.cpp @@ -161,7 +161,9 @@ namespace libtorrent { for (auto const p : m_peers) m_peer_allocator.free_peer_entry(p); m_peers.clear(); + m_candidate_cache.clear(); m_num_connect_candidates = 0; + m_num_seeds = 0; } peer_list::~peer_list() From 8b128d66cc26eb2d49d88fa42f4f2b0b741e8c1f Mon Sep 17 00:00:00 2001 From: Lwxiang Date: Wed, 28 Jun 2023 20:42:33 +0800 Subject: [PATCH 14/29] TEST(peer_list): add clear_peers unittest for peer_list --- include/libtorrent/peer_list.hpp | 1 + test/test_peer_list.cpp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/include/libtorrent/peer_list.hpp b/include/libtorrent/peer_list.hpp index 3fe0711bd5b..502919baac2 100644 --- a/include/libtorrent/peer_list.hpp +++ b/include/libtorrent/peer_list.hpp @@ -159,6 +159,7 @@ namespace libtorrent { #endif int num_peers() const { return int(m_peers.size()); } + int num_candidate_cache() const { return int(m_candidate_cache.size()); } using peers_t = aux::deque; using iterator = peers_t::iterator; diff --git a/test/test_peer_list.cpp b/test/test_peer_list.cpp index 85e6d333657..f54b2bd7b63 100644 --- a/test/test_peer_list.cpp +++ b/test/test_peer_list.cpp @@ -1206,6 +1206,38 @@ TORRENT_TEST(peer_info_set_i2p_destination) } #endif +TORRENT_TEST(clear_peers) +{ + torrent_state st = init_state(); + st.max_peerlist_size = 5; + mock_torrent t(&st); + peer_list p(allocator); + t.m_p = &p; + + torrent_peer* peer1 = add_peer(p, st, ep("10.0.0.1", 8080)); + TEST_CHECK(peer1); + p.set_seed(peer1, true); + + torrent_peer* peer2 = add_peer(p, st, ep("10.0.0.2", 8080)); + TEST_CHECK(peer2); + + torrent_peer* peer3 = add_peer(p, st, ep("10.0.0.3", 8080)); + TEST_CHECK(peer3); + + p.connect_one_peer(1, &st); + + TEST_EQUAL(p.num_peers(), 3); + TEST_EQUAL(p.num_candidate_cache(), 2); + TEST_EQUAL(p.num_connect_candidates(), 3); + TEST_EQUAL(p.num_seeds(), 1); + + p.clear(); + TEST_EQUAL(p.num_peers(), 0); + TEST_EQUAL(p.num_candidate_cache(), 0); + TEST_EQUAL(p.num_connect_candidates(), 0); + TEST_EQUAL(p.num_seeds(), 0); +} + // TODO: test erasing peers // TODO: test update_peer_port with allow_multiple_connections_per_ip and without // TODO: test add i2p peers From 1dba9f39241657ad12d42847337234f1a8f6b8ea Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 08:31:14 +0200 Subject: [PATCH 15/29] clang v16 (in combination with mingw-w64) has gotten stricter and now fails with: hidden visibility cannot be applied to 'dllexport' declaration --- include/libtorrent/aux_/export.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/aux_/export.hpp b/include/libtorrent/aux_/export.hpp index 18c69e95e52..77a744f9ae4 100644 --- a/include/libtorrent/aux_/export.hpp +++ b/include/libtorrent/aux_/export.hpp @@ -99,8 +99,11 @@ POSSIBILITY OF SUCH DAMAGE. # endif #endif +// clang on windows complain if you mark a symbol with visibility hidden that's +// already being exported with dllexport. It seems dllexport doesn't support +// omitting some members of an exported class #if !defined TORRENT_EXPORT_EXTRA \ - && ((defined __GNUC__ && __GNUC__ >= 4) || defined __clang__) + && ((defined __GNUC__ && __GNUC__ >= 4) || defined __clang__) && !defined _WIN32 # define TORRENT_UNEXPORT __attribute__((visibility("hidden"))) #else # define TORRENT_UNEXPORT From 773721857f7d2d7846f5160aee9b0ece84ebaae8 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Tue, 4 Jul 2023 22:18:12 +0300 Subject: [PATCH 16/29] Allow to change save path without moving any files --- include/libtorrent/storage_defs.hpp | 7 ++++++- src/storage_utils.cpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/storage_defs.hpp b/include/libtorrent/storage_defs.hpp index f4c5e3e6d1c..b77accdb4f7 100644 --- a/include/libtorrent/storage_defs.hpp +++ b/include/libtorrent/storage_defs.hpp @@ -1,5 +1,6 @@ /* +Copyright (c) 2023, Vladimir Golovnev Copyright (c) 2006-2007, 2009, 2013-2014, 2016-2020, 2022, Arvid Norberg Copyright (c) 2016, 2021, Alden Torres All rights reserved. @@ -110,7 +111,11 @@ namespace libtorrent { // if any file exist in the target, take those files instead // of the ones we may have in the source. - dont_replace + dont_replace, + + // don't move any source files, just forget about them + // and begin checking files at new save path + reset_save_path }; #if TORRENT_ABI_VERSION == 1 diff --git a/src/storage_utils.cpp b/src/storage_utils.cpp index 239ab256aa4..a0d9cd6f699 100644 --- a/src/storage_utils.cpp +++ b/src/storage_utils.cpp @@ -1,5 +1,6 @@ /* +Copyright (c) 2023, Vladimir Golovnev Copyright (c) 2016-2022, Arvid Norberg Copyright (c) 2017-2018, Alden Torres Copyright (c) 2017-2018, Steven Siloti @@ -199,6 +200,9 @@ namespace libtorrent { namespace aux { } } + if (flags == move_flags_t::reset_save_path) + return { status_t::need_full_check, new_save_path }; + // indices of all files we ended up copying. These need to be deleted // later aux::vector copied_files(std::size_t(f.num_files()), false); From 34285c60d4bf8c302203828f572d5c785900648f Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (glassez)" Date: Wed, 2 Aug 2023 18:34:12 +0300 Subject: [PATCH 17/29] Allow to change save path without any additional actions --- include/libtorrent/storage_defs.hpp | 6 +++++- src/storage_utils.cpp | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/storage_defs.hpp b/include/libtorrent/storage_defs.hpp index b77accdb4f7..45a090f2854 100644 --- a/include/libtorrent/storage_defs.hpp +++ b/include/libtorrent/storage_defs.hpp @@ -115,7 +115,11 @@ namespace libtorrent { // don't move any source files, just forget about them // and begin checking files at new save path - reset_save_path + reset_save_path, + + // don't move any source files, just change save path + // and continue working without any checks + reset_save_path_unchecked }; #if TORRENT_ABI_VERSION == 1 diff --git a/src/storage_utils.cpp b/src/storage_utils.cpp index a0d9cd6f699..bef1219ce3e 100644 --- a/src/storage_utils.cpp +++ b/src/storage_utils.cpp @@ -203,6 +203,9 @@ namespace libtorrent { namespace aux { if (flags == move_flags_t::reset_save_path) return { status_t::need_full_check, new_save_path }; + if (flags == move_flags_t::reset_save_path_unchecked) + return { status_t::no_error, new_save_path }; + // indices of all files we ended up copying. These need to be deleted // later aux::vector copied_files(std::size_t(f.num_files()), false); From 13009ef066e4460791d6070ea918edd26e9d5ca8 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 10:23:56 +0200 Subject: [PATCH 18/29] add python binding --- bindings/python/src/torrent_handle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 12fcbca9455..3761260ddc1 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -468,6 +468,8 @@ void bind_torrent_handle() .value("always_replace_files", move_flags_t::always_replace_files) .value("fail_if_exist", move_flags_t::fail_if_exist) .value("dont_replace", move_flags_t::dont_replace) + .value("reset_save_path", move_flags_t::reset_save_path) + .value("reset_save_path_unchecked", move_flags_t::reset_save_path_unchecked) ; #if TORRENT_ABI_VERSION == 1 From 5ef044aa2a287cbd11d7fb29f0a1d81d89a26b0c Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 10:43:51 +0200 Subject: [PATCH 19/29] add test --- test/test_storage.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/test/test_storage.cpp b/test/test_storage.cpp index 6a966a6b8f3..77a0cc9244d 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -1387,6 +1387,48 @@ void test_move_storage_into_self() , combine_path("_folder3", "test4.tmp"))))); } +template +void test_move_storage_reset(move_flags_t const flags) +{ + std::string const save_path = current_working_directory(); + std::string const test_path = complete("temp_storage2"); + delete_dirs(test_path); + + aux::session_settings set; + file_storage fs; + std::vector buf; + typename file_pool_type::type fp; + io_context ios; + auto s = setup_torrent(fs, fp, buf, save_path, set); + + span const b = {&buf[0], 4}; + storage_error se; + TEST_EQUAL(se.ec, boost::system::errc::success); + write(s, set, b, 1_piece, 0, aux::open_mode::write, se); + + std::string const root = combine_path(save_path, "temp_storage"); + TEST_CHECK(exists(combine_path(root, combine_path("folder2", "test3.tmp")))); + TEST_CHECK(exists(combine_path(root, combine_path("_folder3", "test4.tmp")))); + std::string const root2 = combine_path(test_path, "temp_storage"); + TEST_CHECK(!exists(combine_path(root2, combine_path("folder2", "test3.tmp")))); + TEST_CHECK(!exists(combine_path(root2, combine_path("_folder3", "test4.tmp")))); + TEST_EQUAL(se.ec, boost::system::errc::success); + + std::string new_path; + status_t ret; + std::tie(ret, new_path) = s->move_storage(test_path, flags, se); + TEST_EQUAL(new_path, test_path); + TEST_EQUAL(se.ec, boost::system::errc::success); + std::cerr << "file: " << se.file() << '\n'; + std::cerr << "op: " << int(se.operation) << '\n'; + std::cerr << "ec: " << se.ec.message() << '\n'; + + // the root directory is created, but none of the files are moved + TEST_CHECK(exists(test_path)); + TEST_CHECK(!exists(combine_path(root2, combine_path("folder2", "test3.tmp")))); + TEST_CHECK(!exists(combine_path(root2, combine_path("_folder3", "test4.tmp")))); +} + #if TORRENT_HAVE_MMAP || TORRENT_HAVE_MAP_VIEW_OF_FILE TORRENT_TEST(move_default_storage_to_self) { @@ -1398,6 +1440,11 @@ TORRENT_TEST(move_default_storage_into_self) test_move_storage_into_self(); } +TORRENT_TEST(move_default_storage_reset) +{ + test_move_storage_reset(move_flags_t::reset_save_path); + test_move_storage_reset(move_flags_t::reset_save_path_unchecked); +} #endif TORRENT_TEST(move_posix_storage_to_self) @@ -1410,6 +1457,12 @@ TORRENT_TEST(move_posix_storage_into_self) test_move_storage_into_self(); } +TORRENT_TEST(move_posix_storage_reset) +{ + test_move_storage_reset(move_flags_t::reset_save_path); + test_move_storage_reset(move_flags_t::reset_save_path_unchecked); +} + TORRENT_TEST(storage_paths_string_pooling) { file_storage file_storage; From e845e1cc31f07eada40d18e817e3936940ae1b1b Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 16:01:16 +0200 Subject: [PATCH 20/29] fix unnecessary capture of this in lambda expressions. and avoid implicitly capturing it, to conform to C++20 --- include/libtorrent/aux_/resolver.hpp | 3 --- src/resolver.cpp | 12 +++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/libtorrent/aux_/resolver.hpp b/include/libtorrent/aux_/resolver.hpp index a0eb6b300f4..8b1e2e7ab35 100644 --- a/include/libtorrent/aux_/resolver.hpp +++ b/include/libtorrent/aux_/resolver.hpp @@ -67,9 +67,6 @@ struct TORRENT_EXTRA_EXPORT resolver final : resolver_interface void on_lookup(error_code const& ec, tcp::resolver::results_type ips , std::string const& hostname); - void callback(resolver_interface::callback_t h - , error_code const& ec, std::vector
const& ips); - struct dns_cache_entry { time_point last_seen; diff --git a/src/resolver.cpp b/src/resolver.cpp index 33096ad5273..d61ad3ef7f0 100644 --- a/src/resolver.cpp +++ b/src/resolver.cpp @@ -50,7 +50,8 @@ namespace aux { , m_timeout(seconds(1200)) {} - void resolver::callback(resolver_interface::callback_t h +namespace { + void callback(resolver_interface::callback_t h , error_code const& ec, std::vector
const& ips) { try { @@ -59,6 +60,7 @@ namespace aux { TORRENT_ASSERT_FAIL(); } } +} void resolver::on_lookup(error_code const& ec, tcp::resolver::results_type ips , std::string const& hostname) @@ -134,7 +136,7 @@ namespace aux { address const ip = make_address(host, ec); if (!ec) { - post(m_ios, [this, h, ec, ip]{ callback(h, ec, std::vector
{ip}); }); + post(m_ios, [h, ec, ip]{ callback(h, ec, std::vector
{ip}); }); return; } ec.clear(); @@ -147,7 +149,7 @@ namespace aux { || i->second.last_seen + m_timeout >= time_now()) { std::vector
ips = i->second.addresses; - post(m_ios, [this, h, ec, ips] { callback(h, ec, ips); }); + post(m_ios, [h, ec, ips] { callback(h, ec, ips); }); return; } } @@ -160,7 +162,7 @@ namespace aux { || k->second.last_seen + m_timeout >= time_now()) { error_code error_code = k->second.error; - post(m_ios, [this, h, error_code] { callback(h, error_code, {}); }); + post(m_ios, [h, error_code] { callback(h, error_code, {}); }); return; } } @@ -168,7 +170,7 @@ namespace aux { if (flags & resolver_interface::cache_only) { // we did not find a cache entry, fail the lookup - post(m_ios, [this, h] { + post(m_ios, [h] { callback(h, boost::asio::error::host_not_found, std::vector
{}); }); return; From cb0c4bddf34ccc228c4d38cae76783dc2e5333b8 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 12:14:23 +0200 Subject: [PATCH 21/29] run thread-sanitizer on Ubuntu-22.04 on CI, to address https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/2029910 --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 86609b94fa6..cd56d681dc3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -186,7 +186,7 @@ jobs: test: name: Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 continue-on-error: true strategy: From 8dc6aa8ed69b91ff98909ca6ea65bf80ff81fa4e Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 12:43:47 +0200 Subject: [PATCH 22/29] bump clang version to 12 --- .github/workflows/linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cd56d681dc3..3c11975ec44 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -221,16 +221,16 @@ jobs: run: | sudo apt install libgnutls28-dev - - name: install clang-10 + - name: install clang-12 continue-on-error: true run: | - sudo apt install clang-10 + sudo apt install clang-12 - name: install boost run: | sudo apt install libboost-tools-dev libboost-dev libboost-system-dev echo "using gcc ;" >>~/user-config.jam - echo "using clang : 10 : clang++-10 ;" >>~/user-config.jam + echo "using clang : 12 : clang++-12 ;" >>~/user-config.jam - name: build and run tests run: | From a7734ba6827e838739c64d111bc86d3f19fa3626 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 14:16:23 +0200 Subject: [PATCH 23/29] use GCC-12 --- .github/workflows/linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3c11975ec44..2fac0cbfa82 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -226,10 +226,15 @@ jobs: run: | sudo apt install clang-12 + - name: install GCC-12 + continue-on-error: true + run: | + sudo apt install gcc-12 + - name: install boost run: | sudo apt install libboost-tools-dev libboost-dev libboost-system-dev - echo "using gcc ;" >>~/user-config.jam + echo "using gcc : 12 : g++-12 ;" >>~/user-config.jam echo "using clang : 12 : clang++-12 ;" >>~/user-config.jam - name: build and run tests From 27da18321038b6f36c3629a0ebb788b04ee7e787 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 15:41:01 +0200 Subject: [PATCH 24/29] fix warning --- test/test_dht.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 093e15cf1e3..64627e7c1a2 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -2576,7 +2576,7 @@ TORRENT_TEST(traversal_done) TEST_ERROR(t.error_string); continue; } - char tok[11]; + char tok[15]; std::snprintf(tok, sizeof(tok), "%02d", i); msg_args args; From eea4c64144bee3c1fb6bad6a691699d9ba48aa57 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 25 Aug 2023 00:46:25 +0200 Subject: [PATCH 25/29] disable tsan warnings as errors --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2fac0cbfa82..c58409220cd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -194,7 +194,7 @@ jobs: include: - config: address-sanitizer=norecover undefined-sanitizer=norecover crypto=openssl - config: toolset=clang logging=off address-sanitizer=norecover undefined-sanitizer=norecover - - config: thread-sanitizer=norecover crypto=openssl release debug-symbols=on + - config: thread-sanitizer=norecover crypto=openssl release debug-symbols=on cxxflags=-Wno-tsan - config: crypto=gnutls - config: deprecated-functions=off From 6c6735492da0548b20035286899a9fa904973c32 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 25 Aug 2023 09:41:41 +0200 Subject: [PATCH 26/29] suppress false-positive warnings in GCC12 --- src/kademlia/node_id.cpp | 7 +++++++ src/pe_crypto.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/kademlia/node_id.cpp b/src/kademlia/node_id.cpp index d255ca288f5..0b153d49ff3 100644 --- a/src/kademlia/node_id.cpp +++ b/src/kademlia/node_id.cpp @@ -207,7 +207,14 @@ node_id generate_prefix_mask(int const bits) TORRENT_ASSERT(bits <= 160); node_id mask; std::size_t b = 0; +#if defined __GNUC__ && __GNUC__ == 12 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif for (; int(b) < bits - 7; b += 8) mask[b / 8] |= 0xff; +#if defined __GNUC__ && __GNUC__ == 12 +#pragma GCC diagnostic pop +#endif if (bits < 160) mask[b / 8] |= (0xff << (8 - (bits & 7))) & 0xff; return mask; } diff --git a/src/pe_crypto.cpp b/src/pe_crypto.cpp index 9bb5e0eca7e..b05abea7880 100644 --- a/src/pe_crypto.cpp +++ b/src/pe_crypto.cpp @@ -73,7 +73,14 @@ namespace libtorrent { if (end < begin + 96) { int const len = int(end - begin); +#if defined __GNUC__ && __GNUC__ == 12 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif std::memmove(begin + 96 - len, begin, aux::numeric_cast(len)); +#if defined __GNUC__ && __GNUC__ == 12 +#pragma GCC diagnostic pop +#endif std::memset(begin, 0, aux::numeric_cast(96 - len)); } return ret; From 0732426b07ea484e8997e08fb37c2d523114354b Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 13:04:48 +0200 Subject: [PATCH 27/29] make sure the library builds with C++17 and C++20, in addition to C++14 --- .github/workflows/linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c58409220cd..2e530209159 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,7 +25,7 @@ jobs: build: name: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 continue-on-error: true strategy: @@ -61,17 +61,17 @@ jobs: - name: build library run: | - b2 ${{ matrix.config }} cxxstd=14 + b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on - name: build examples run: | cd examples - b2 ${{ matrix.config }} + b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on - name: build tools run: | cd tools - b2 ${{ matrix.config }} warnings-as-errors=on + b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on From f9f14b22bb39bfcbfcf4700c6786533b5ef0b181 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 25 Aug 2023 00:37:50 +0200 Subject: [PATCH 28/29] also build python binding in linux.yml --- .github/workflows/linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2e530209159..f65aec349f2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -52,7 +52,7 @@ jobs: - name: install boost run: | - sudo apt install libboost-tools-dev libboost-dev libboost-system-dev + sudo apt install libboost-python-dev libboost-tools-dev libboost-dev libboost-system-dev python3 echo "using gcc ;" >>~/user-config.jam - name: install gcrypt @@ -73,6 +73,11 @@ jobs: cd tools b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on + - name: build python bindings + run: | + cd bindings/python + echo "using python ;" >>~/user-config.jam + BOOST_ROOT="" b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on fuzzers: From 7208996832d5803d6090a37a94caf48369d35380 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 24 Aug 2023 16:34:21 +0200 Subject: [PATCH 29/29] rely on RVO in C++20 --- bindings/python/src/entry.cpp | 4 ++-- include/libtorrent/config.hpp | 6 ++++++ src/alert.cpp | 6 +++--- src/session_stats.cpp | 2 +- src/torrent_handle.cpp | 6 +++--- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/bindings/python/src/entry.cpp b/bindings/python/src/entry.cpp index 6e0ee74aadb..e4c55aa14a3 100644 --- a/bindings/python/src/entry.cpp +++ b/bindings/python/src/entry.cpp @@ -20,7 +20,7 @@ struct entry_to_python result.append(*i); } - return std::move(result); + return TORRENT_RVO(result); } static object convert(entry::dictionary_type const& d) @@ -30,7 +30,7 @@ struct entry_to_python for (entry::dictionary_type::const_iterator i(d.begin()), e(d.end()); i != e; ++i) result[bytes(i->first)] = i->second; - return std::move(result); + return TORRENT_RVO(result); } static object convert0(entry const& e) diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index dd1157367eb..c354f29e7b5 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -616,6 +616,12 @@ POSSIBILITY OF SUCH DAMAGE. #define __has_builtin(x) 0 // for non-clang compilers #endif +#if __cplusplus >= 202002L +#define TORRENT_RVO(x) x +#else +#define TORRENT_RVO(x) std::move(x) +#endif + #if (TORRENT_HAS_SSE && defined __GNUC__) # define TORRENT_HAS_BUILTIN_CLZ 1 #elif (TORRENT_HAS_ARM && defined __GNUC__ && !defined __clang__) diff --git a/src/alert.cpp b/src/alert.cpp index a848899ecb2..e0853ea9b3a 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -2579,7 +2579,7 @@ namespace { for (int i = 0; i < m_v6_num_peers; i++) peers.push_back(aux::read_v6_endpoint(v6_ptr)); - return std::move(peers); + return TORRENT_RVO(peers); } dht_direct_response_alert::dht_direct_response_alert( @@ -2819,7 +2819,7 @@ namespace { nodes.emplace_back(ih, aux::read_v6_endpoint(v6_ptr)); } - return std::move(nodes); + return TORRENT_RVO(nodes); } } @@ -2931,7 +2931,7 @@ namespace { char const* ptr = m_alloc.get().ptr(m_samples_idx); std::memcpy(samples.data(), ptr, samples.size() * 20); - return std::move(samples); + return TORRENT_RVO(samples); } int dht_sample_infohashes_alert::num_nodes() const diff --git a/src/session_stats.cpp b/src/session_stats.cpp index 6bbe196b3a4..d31125b2bac 100644 --- a/src/session_stats.cpp +++ b/src/session_stats.cpp @@ -584,7 +584,7 @@ namespace { stats[i].type = metrics[i].value_index >= counters::num_stats_counters ? metric_type_t::gauge : metric_type_t::counter; } - return std::move(stats); + return TORRENT_RVO(stats); } int find_metric_idx(string_view name) diff --git a/src/torrent_handle.cpp b/src/torrent_handle.cpp index 6f7415128f8..c255e7a7282 100644 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -484,7 +484,7 @@ namespace libtorrent { { aux::vector ret; sync_call(&torrent::file_progress, std::ref(ret), flags); - return std::move(ret); + return TORRENT_RVO(ret); } void torrent_handle::post_file_progress(file_progress_flags_t const flags) const @@ -542,7 +542,7 @@ namespace libtorrent { aux::vector ret; auto retp = &ret; sync_call(&torrent::piece_priorities, retp); - return std::move(ret); + return TORRENT_RVO(ret); } #if TORRENT_ABI_VERSION == 1 @@ -598,7 +598,7 @@ namespace libtorrent { aux::vector ret; auto retp = &ret; sync_call(&torrent::file_priorities, retp); - return std::move(ret); + return TORRENT_RVO(ret); } #if TORRENT_ABI_VERSION == 1