diff --git a/.cirrus.yml b/.cirrus.yml index 54857559bf6..2f00a72b3c6 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 @@ -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/.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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e67f72b6079..ea692f7dccb 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: @@ -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 @@ -61,18 +61,23 @@ jobs: - name: build library run: | - b2 ${{ matrix.config }} + 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 + - 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: @@ -186,7 +191,7 @@ jobs: test: name: Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 continue-on-error: true strategy: @@ -194,7 +199,7 @@ jobs: include: - config: webtorrent=on 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 @@ -221,17 +226,22 @@ 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 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 pip install websockets - echo "using gcc ;" >>~/user-config.jam - echo "using clang : 10 : clang++-10 ;" >>~/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 run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 169b5f791dc..c76262e0b0c 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 @@ -27,12 +27,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 @@ -61,13 +61,13 @@ 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] -- 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 @@ -107,7 +107,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 @@ -140,7 +140,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/CMakeLists.txt b/CMakeLists.txt index b39bdece465..9b014b2a5e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,11 +561,17 @@ target_compile_definitions(torrent-rasterbar _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING 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 diff --git a/ChangeLog b/ChangeLog index 0369792b2e0..947f5f8295b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ * libtorrent now requires C++17 to build * added support for WebTorrent + * 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 * fallocate() not supported is not a fatal error @@ -162,7 +165,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 @@ -280,7 +283,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 @@ -334,7 +337,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 @@ -414,7 +417,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 @@ -423,7 +426,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 @@ -617,7 +620,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 @@ -652,7 +655,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 @@ -938,7 +941,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 @@ -1121,7 +1124,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 @@ -1137,7 +1140,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 @@ -1314,7 +1317,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 @@ -1706,7 +1709,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 @@ -1733,7 +1736,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 / @@ -1826,7 +1829,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 @@ -1851,7 +1854,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) @@ -1865,7 +1868,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 @@ -1886,7 +1889,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 @@ -1957,7 +1960,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. @@ -2068,7 +2071,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 @@ -2098,9 +2101,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 @@ -2166,7 +2169,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/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 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/bindings/python/src/converters.cpp b/bindings/python/src/converters.cpp index 33d30b7d42e..b3ae6ab51b0 100644 --- a/bindings/python/src/converters.cpp +++ b/bindings/python/src/converters.cpp @@ -25,6 +25,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 diff --git a/bindings/python/src/entry.cpp b/bindings/python/src/entry.cpp index fb7ea1449b0..edc37e99d2a 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/bindings/python/src/error_code.cpp b/bindings/python/src/error_code.cpp index 29895014187..2c9ca94933a 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/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index c8d4f3f249d..89c6ae728cc 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -506,6 +506,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 diff --git a/docs/tuning.rst b/docs/tuning.rst index c526de51ba7..c6e46b030b1 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 df2fe8e061a..815e29db0b2 100644 --- a/examples/connection_tester.cpp +++ b/examples/connection_tester.cpp @@ -58,7 +58,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 05b864d9976..6c3b6e36fc7 100644 --- a/examples/torrent_view.cpp +++ b/examples/torrent_view.cpp @@ -428,8 +428,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_/disable_warnings_push.hpp b/include/libtorrent/aux_/disable_warnings_push.hpp index 87db1f7fd42..dd077784cdf 100644 --- a/include/libtorrent/aux_/disable_warnings_push.hpp +++ b/include/libtorrent/aux_/disable_warnings_push.hpp @@ -43,6 +43,9 @@ see LICENSE file. #if __GNUC__ >= 9 #pragma GCC diagnostic ignored "-Wdeprecated-copy" #endif +#if __GNUC__ >= 12 +#pragma GCC diagnostic ignored "-Woverflow" +#endif #endif #ifdef __clang__ diff --git a/include/libtorrent/aux_/export.hpp b/include/libtorrent/aux_/export.hpp index 944f4a8d2d1..2344bccf45e 100644 --- a/include/libtorrent/aux_/export.hpp +++ b/include/libtorrent/aux_/export.hpp @@ -94,8 +94,11 @@ see LICENSE file. # 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 diff --git a/include/libtorrent/aux_/io.hpp b/include/libtorrent/aux_/io.hpp index 37f8bf863f8..d847182cd87 100644 --- a/include/libtorrent/aux_/io.hpp +++ b/include/libtorrent/aux_/io.hpp @@ -23,7 +23,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_/io_bytes.hpp b/include/libtorrent/aux_/io_bytes.hpp index 2762b07e6a4..44ded6b3aae 100644 --- a/include/libtorrent/aux_/io_bytes.hpp +++ b/include/libtorrent/aux_/io_bytes.hpp @@ -26,7 +26,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/aux_/merkle.hpp b/include/libtorrent/aux_/merkle.hpp index 75b2ad8e23c..427b5a7259e 100644 --- a/include/libtorrent/aux_/merkle.hpp +++ b/include/libtorrent/aux_/merkle.hpp @@ -129,7 +129,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 91c95115f23..367244be676 100644 --- a/include/libtorrent/aux_/merkle_tree.hpp +++ b/include/libtorrent/aux_/merkle_tree.hpp @@ -153,7 +153,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_/mmap_storage.hpp b/include/libtorrent/aux_/mmap_storage.hpp index f7e9efb549f..491f2b1eedb 100644 --- a/include/libtorrent/aux_/mmap_storage.hpp +++ b/include/libtorrent/aux_/mmap_storage.hpp @@ -190,7 +190,7 @@ namespace libtorrent::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/aux_/peer_connection.hpp b/include/libtorrent/aux_/peer_connection.hpp index b4ef5ffada2..93244c0d888 100644 --- a/include/libtorrent/aux_/peer_connection.hpp +++ b/include/libtorrent/aux_/peer_connection.hpp @@ -629,7 +629,7 @@ namespace libtorrent::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/aux_/peer_list.hpp b/include/libtorrent/aux_/peer_list.hpp index 882f8e8dc8f..87c002e3408 100644 --- a/include/libtorrent/aux_/peer_list.hpp +++ b/include/libtorrent/aux_/peer_list.hpp @@ -142,6 +142,7 @@ namespace libtorrent::aux { #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/include/libtorrent/aux_/piece_picker.hpp b/include/libtorrent/aux_/piece_picker.hpp index 4ea7f7fb2d4..7dc68a8e054 100644 --- a/include/libtorrent/aux_/piece_picker.hpp +++ b/include/libtorrent/aux_/piece_picker.hpp @@ -788,8 +788,8 @@ namespace libtorrent::aux { // 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/aux_/proxy_base.hpp b/include/libtorrent/aux_/proxy_base.hpp index c76b8d6d2fa..477a492c69b 100644 --- a/include/libtorrent/aux_/proxy_base.hpp +++ b/include/libtorrent/aux_/proxy_base.hpp @@ -102,7 +102,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/aux_/resolver.hpp b/include/libtorrent/aux_/resolver.hpp index c58b1d578b7..2a7759c1f4e 100644 --- a/include/libtorrent/aux_/resolver.hpp +++ b/include/libtorrent/aux_/resolver.hpp @@ -44,9 +44,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; @@ -76,7 +73,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 297b268bfdc..5d605b6d077 100644 --- a/include/libtorrent/aux_/resolver_interface.hpp +++ b/include/libtorrent/aux_/resolver_interface.hpp @@ -30,7 +30,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 inline constexpr resolver_flags cache_only = 0_bit; diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 57fab3e4ceb..d41ad3119e8 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -220,7 +220,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_/torrent.hpp b/include/libtorrent/aux_/torrent.hpp index 3e7a25af3fa..448cc9824f6 100644 --- a/include/libtorrent/aux_/torrent.hpp +++ b/include/libtorrent/aux_/torrent.hpp @@ -1003,7 +1003,7 @@ namespace libtorrent::aux { // 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 @@ -1413,7 +1413,7 @@ namespace libtorrent::aux { // 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/include/libtorrent/aux_/utp_stream.hpp b/include/libtorrent/aux_/utp_stream.hpp index e5aae55058c..596e56c4d79 100644 --- a/include/libtorrent/aux_/utp_stream.hpp +++ b/include/libtorrent/aux_/utp_stream.hpp @@ -500,7 +500,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/config.hpp b/include/libtorrent/config.hpp index c0ca887c5b6..66460bb9e25 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -589,6 +589,12 @@ see LICENSE file. #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/include/libtorrent/kademlia/refresh.hpp b/include/libtorrent/kademlia/refresh.hpp index 77908c3ef15..9716212e238 100644 --- a/include/libtorrent/kademlia/refresh.hpp +++ b/include/libtorrent/kademlia/refresh.hpp @@ -38,7 +38,7 @@ class bootstrap : public get_peers }; -} // namesapce dht +} // namespace dht } // namespace libtorrent #endif // REFRESH_050324_HPP diff --git a/include/libtorrent/socks5_stream.hpp b/include/libtorrent/socks5_stream.hpp index 553712bbd6a..450c86a3506 100644 --- a/include/libtorrent/socks5_stream.hpp +++ b/include/libtorrent/socks5_stream.hpp @@ -104,7 +104,7 @@ class socks5_stream : public aux::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/storage_defs.hpp b/include/libtorrent/storage_defs.hpp index d2300ecfd02..2550c8c7a5c 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-2022, Arvid Norberg Copyright (c) 2016, 2021, Alden Torres All rights reserved. @@ -55,7 +56,15 @@ 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, + + // 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/pyproject.toml b/pyproject.toml index 38e88389f3e..8627418554a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,8 +12,8 @@ test-requires = [ [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", @@ -25,16 +25,16 @@ 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.14" # required for full C++17 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_*" @@ -45,17 +45,17 @@ test-command = [ "python -m mypy --config-file mypy-tox.ini tests", ] -[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.80.0" +BOOST_VERSION = "1.81.0" 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_*" @@ -66,23 +66,23 @@ test-command = [ "python -m mypy --config-file mypy-tox.ini tests", ] -[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.76.0" +BOOST_VERSION = "1.81.0" 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" @@ -92,7 +92,7 @@ test-command = '''bash -c "cd '{project}/bindings/python' && python -m pip insta [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] diff --git a/simulation/disk_io.hpp b/simulation/disk_io.hpp index 04226937982..f485930ca03 100644 --- a/simulation/disk_io.hpp +++ b/simulation/disk_io.hpp @@ -77,7 +77,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 d2e00714777..6a764426c18 100644 --- a/simulation/test_file_pool.cpp +++ b/simulation/test_file_pool.cpp @@ -54,7 +54,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_socks5.cpp b/simulation/test_socks5.cpp index 8170d0f1d05..19b30c0eff0 100644 --- a/simulation/test_socks5.cpp +++ b/simulation/test_socks5.cpp @@ -277,7 +277,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 cdf88c9fdee..b1cb887ac11 100644 --- a/simulation/test_swarm.cpp +++ b/simulation/test_swarm.cpp @@ -456,7 +456,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 2959966c37f..e060ffbe954 100644 --- a/simulation/test_timeout.cpp +++ b/simulation/test_timeout.cpp @@ -217,7 +217,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 2bdc48abfcb..76f29c3b922 100644 --- a/simulation/test_torrent_status.cpp +++ b/simulation/test_torrent_status.cpp @@ -106,7 +106,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))); @@ -152,7 +152,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))); @@ -179,9 +179,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 @@ -231,7 +231,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))); @@ -303,7 +303,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 7c9317f0044..2b191da79d8 100644 --- a/simulation/test_utp.cpp +++ b/simulation/test_utp.cpp @@ -87,7 +87,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/alert.cpp b/src/alert.cpp index b014526fe19..5fc4bc74082 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -2508,7 +2508,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( @@ -2729,7 +2729,7 @@ namespace { nodes.emplace_back(ih, aux::read_v6_endpoint(v6_ptr)); } - return std::move(nodes); + return TORRENT_RVO(nodes); } } @@ -2841,7 +2841,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/bdecode.cpp b/src/bdecode.cpp index a9621d6233e..66f9cecc44d 100644 --- a/src/bdecode.cpp +++ b/src/bdecode.cpp @@ -127,7 +127,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 cf8e5fbef46..1a0aa43464a 100644 --- a/src/choker.cpp +++ b/src/choker.cpp @@ -47,7 +47,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 bf1dcb090ca..c413dfb887a 100644 --- a/src/enum_net.cpp +++ b/src/enum_net.cpp @@ -279,7 +279,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_pool_impl.cpp b/src/file_pool_impl.cpp index f5fb624eef5..494f5a2d711 100644 --- a/src/file_pool_impl.cpp +++ b/src/file_pool_impl.cpp @@ -250,7 +250,7 @@ namespace libtorrent::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/file_storage.cpp b/src/file_storage.cpp index e65f8c300fe..54d1e29adaa 100644 --- a/src/file_storage.cpp +++ b/src/file_storage.cpp @@ -1263,7 +1263,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()) @@ -1283,7 +1283,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/gzip.cpp b/src/gzip.cpp index f3890f63425..dbb5963dc62 100644 --- a/src/gzip.cpp +++ b/src/gzip.cpp @@ -105,7 +105,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 72f04bc7bd0..036fa480d22 100644 --- a/src/ip_notifier.cpp +++ b/src/ip_notifier.cpp @@ -149,7 +149,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/kademlia/node_id.cpp b/src/kademlia/node_id.cpp index 117174527a4..432c5baeaf1 100644 --- a/src/kademlia/node_id.cpp +++ b/src/kademlia/node_id.cpp @@ -184,7 +184,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/merkle_tree.cpp b/src/merkle_tree.cpp index ed9bfede08e..bc2e59f5b84 100644 --- a/src/merkle_tree.cpp +++ b/src/merkle_tree.cpp @@ -137,7 +137,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 871dd3f0fff..8a70e45c887 100644 --- a/src/mmap_disk_io.cpp +++ b/src/mmap_disk_io.cpp @@ -847,7 +847,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/pe_crypto.cpp b/src/pe_crypto.cpp index acb5b10e0f6..ce912290572 100644 --- a/src/pe_crypto.cpp +++ b/src/pe_crypto.cpp @@ -45,7 +45,14 @@ namespace libtorrent::aux { 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; diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index f87a120ed21..01167f856a6 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -5498,7 +5498,7 @@ namespace { { 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 40ced6351c2..2a9b83bb113 100644 --- a/src/peer_list.cpp +++ b/src/peer_list.cpp @@ -136,7 +136,9 @@ namespace libtorrent::aux { for (auto* 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() @@ -441,7 +443,7 @@ namespace libtorrent::aux { 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 636c53fa890..f9c8e9a5bca 100644 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -3070,7 +3070,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); @@ -3094,7 +3094,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; @@ -3110,7 +3110,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. } @@ -3148,12 +3148,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 6b054d0d4ee..f0ce1d00765 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/resolver.cpp b/src/resolver.cpp index 0bee1a01873..2fcfa9d0b70 100644 --- a/src/resolver.cpp +++ b/src/resolver.cpp @@ -22,7 +22,8 @@ namespace libtorrent::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 { @@ -31,6 +32,7 @@ namespace libtorrent::aux { TORRENT_ASSERT_FAIL(); } } +} void resolver::on_lookup(error_code const& ec, tcp::resolver::results_type ips , std::string const& hostname) @@ -106,7 +108,7 @@ namespace libtorrent::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(); @@ -119,7 +121,7 @@ namespace libtorrent::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; } } @@ -132,7 +134,7 @@ namespace libtorrent::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; } } @@ -140,7 +142,7 @@ namespace libtorrent::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; diff --git a/src/session_impl.cpp b/src/session_impl.cpp index bdf7b753c2d..f26054d86c8 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -2578,7 +2578,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); @@ -3701,7 +3701,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); @@ -6558,7 +6558,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()) @@ -6566,10 +6566,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 diff --git a/src/session_stats.cpp b/src/session_stats.cpp index 495c0a9e9b4..49f0d1f91f0 100644 --- a/src/session_stats.cpp +++ b/src/session_stats.cpp @@ -492,7 +492,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, @@ -556,7 +556,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/sha1.cpp b/src/sha1.cpp index dec71956607..38ee2462e12 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/storage_utils.cpp b/src/storage_utils.cpp index 14787a7d2dc..bfcfa42f8ce 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, 2020, Alden Torres Copyright (c) 2017-2018, Steven Siloti @@ -177,6 +178,12 @@ namespace libtorrent { namespace aux { } } + if (flags == move_flags_t::reset_save_path) + return { disk_status::need_full_check, new_save_path }; + + if (flags == move_flags_t::reset_save_path_unchecked) + return { status_t{}, 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); diff --git a/src/time.cpp b/src/time.cpp index 2ece750821c..c80846acc97 100644 --- a/src/time.cpp +++ b/src/time.cpp @@ -16,7 +16,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 eaeeaea828f..b0273392b31 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -9175,7 +9175,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(); @@ -9192,7 +9192,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/torrent_handle.cpp b/src/torrent_handle.cpp index 6ac06c66c50..90140ebb64b 100644 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -435,7 +435,7 @@ namespace libtorrent { { aux::vector ret; sync_call(&aux::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 @@ -493,7 +493,7 @@ namespace libtorrent { aux::vector ret; auto* const retp = &ret; sync_call(&aux::torrent::piece_priorities, retp); - return std::move(ret); + return TORRENT_RVO(ret); } #if TORRENT_ABI_VERSION == 1 @@ -549,7 +549,7 @@ namespace libtorrent { aux::vector ret; auto* const retp = &ret; sync_call(&aux::torrent::file_priorities, retp); - return std::move(ret); + return TORRENT_RVO(ret); } #if TORRENT_ABI_VERSION == 1 diff --git a/src/ut_metadata.cpp b/src/ut_metadata.cpp index bc3ba6c20be..d84f085ab5b 100644 --- a/src/ut_metadata.cpp +++ b/src/ut_metadata.cpp @@ -52,7 +52,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 1fc46d6dcea..ba31f4259d3 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -235,7 +235,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)); @@ -2297,7 +2297,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; @@ -3277,7 +3277,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 3ce2809e6c1..174228e5351 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 4a4e779c934..1c7d33d560d 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -31,7 +31,7 @@ see LICENSE file. #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/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 -gCW1FPVCZ47vDw7LsDUN3YT4KLRD873kTklX77utK6wCIQweQObe4uLd5/32xTDN -+9AlcjY85axPcMuNw1XhrlZnElNuyxuje+YdFtAaKsSfMC1rd5CYdxdCuRjiLG/q -KwxnzGrb8SMmZNF/PZpq4oY6nO6KAD492zs/82ygnR30XnKpGcoI55yD33ctCHPB -1xzzwzpy2LWJ4kDgQGPESEQZ2R0Nc11mpyimErOc7FBYujIl0wd12xvyOPSs4FH9 -6BlGvg1LQmZGVKt9ksIOBT8ThyKhtjuWr3/A47JFKkirEttMNdBE7J0BVu6ACtTD -99FgISicCUg0UYuR1PSWIyqiWxHlQ4fNUzpFD+/7O300Da3iAbON5KwqWZdPGAIz -DvMBPYZBEn1esL71R6gJQH4hzO9FMvTpNph/qI7F2quDGFK9K+YBhPcCAQI= +MIICCAKCAgEAusZ496/9z7kgXOTCwhmv+teCvMey0fPRxNBi9UdarAah5mU5i0O7 +2PVQ/WgrBpGTCNoN3mj8U4ZFUUrnyLTl5rEcyoICseZOefpCmKUMYQSDy18i0B0V +rRPTTrApfYmAmvapLAHIDaWVImnOccIg05Ou++C5qv+xnJv3zk6D+RiR/tahB035 +wZH1+EpP5fuZTw2RaOb5t/pojWhVACGIzH/xCcJWEOzSE1RQSk0MNx1ntRcwwvBY +hhLikp878h24iLNvbRuk4K/AwnwahpmHs8FkfEzC0NeLJIkN9j1O+jeLzhl6zNZm +cgplMe8A0FlF5ukqEBG9ON5VkWiR1Z4P0iMaTcxVHZ3rlGCs4AkBRlnaZ5vaZYHg +SMqSDaJ/KGEA/ioRMDBR8YG5rl2XZD/Ap105Z7/mVbdVmCtpAUGtSBXXprqp5XuL +wNFGiCOwuWmtenz+SNgQTpyK+GbpIZ980/wM/plakyywOw5sg0G0LSAJGe2Ktn/G +2qfCAk374cqvuT5WdF3TueQvTpDZlgeqGK3K/l9MSVh7pfxrGb9kOYOwQVKihX8L +PtyiBofaH54NjM9BJMmXcAk2PlQwL+UUDzOpPRZKnrgG38idNHIGoTSedPnv3x5m +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+ylbeAzCz8bZGSfjKJlfsGbxcowDQYJKo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+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 PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIbgK6pdYRqXECAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECAbZQRhGG/qyBIIEyCq9SEHTmnEk -OsaBZaeoHfjG8dzZY2axOELULAmDQdVzedp9rJqfuj42SkVs8MVfVY6Y6wprd1Ik -48uOSwFyLECsWhRpSheIjX5ae6WbQv0IefguqLm/CnaAJs1YBUOC7ZnzJ8KVP3eB -5DaZK9nkpqarPXLUoXB8GXxQK/v8K1Q3gmnVbbXjyfo+nOCk5SXrpZnSwJTuEGxn -HEbT0TVOZBFrm8uc4MHd/EcbVvfckKWCtdL61PSx3SCvRcyoMoKXRnKHuhrgWMFo -6mer6E0GhVUSK7U2CHj8mL+UCHwc4pBYG7stxS0HmwBcUra/hP7/Ab9AjFyMOJ9+ -wxW3ocyJjp7mMrk3GAvPojM0rv9QSxOGk/CN9aavp1+xLh6S5vMgE66iY4H4BbDk -cc2uqK3MLHaw5e9PhoHli0/Q0tIoi47z7chrlfesfhMMpj+QbfXxjcvMqOE/AXq7 -JHrNNMJI3iYLDK2MD2gCuI0bMeV+KmacVoHN34SNNm4Ojl3cKkjdFVaVZEtyedgk -BWZmR4czO4RVK6ISiygLCAl9PmCrMOXORYtwxudJ3i2YDR/DWVo7syJ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Pncx93XwHzKjfdVjZo +wFipujTnKalA7AB1dQDVnU9+a7BD6s88SvCFKMisObT+3+RRHRnrc9UqX2zJpi8D +1sTE08kVZSrVhQU1Os2iSDOZZNJUWOSGNjwjTQLma93TVO4FNky3rxCMR1Y/iU7R +8PfiSrf/rlFfTtqZQvrVEw/a7q8Bb0tyCVU/ZWS2wcZRxzJ7Zny7H44wX+Ay6JsT +joq0qR5gU7iLOH9ZfW5EBSYtSVmBskb3XO+pDKLx8U8wruLllClSbKGe3h8MjP8K +VnPWAornhr9mtZx7vvXrYauLPH1+WIISVQMIsEXPgX79JLr2Nxu8prAN0sTo+eeW +jaCa961Rx1LPyqhNwozkk+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: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+WAi93DxRgS+z2SoYiWw +Q2m4hH1UPyUKqfge5EKjf1g+cH5aLkhJq4LouMkRyzPDMyYZi6myhSNPy09mkp5c +sRVS5ZsUdBg94o2hD+6Xzg5Q78xT1I/c5PG+7MGFjmwVwrZ6E7VXqkkdMrLZawo9 +WO8y9/XfAFnY+lFSa95FWmb47rym6jZ6/CWFT8J5IkyQ1iTfUs2dSehVFtF7CWZG +gMowAsz8PurefLg8vqWM6n/bAfvtlJXAdjzYJllVol6XRWhW6vWaHqDWmDgMXgZB +avnz6WD/w64LVGD9FxBR6cnKBNBdkTQzVpBZVUYv1+y4ZaPD -----END CERTIFICATE----- diff --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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qY/ygfG1ly+gWZFC +zt5uiLB6x+e6pt8PCNUwzFF79BGyyMGDNl7XNlsubJP4M5DuCJyM1XZDxNDqJK78 +hnfBGO5n80yg5H2RjCLVOjq7dGBl7aXoawR7Af1KaI4xG3d7lK2FPvGeaXEaRll5 +w4aW+3mIY+0F6FaOgBYtjkKyf7kSLszcAxdA4gjXz+1yz9/9xLQMadqVKmZfCtMS +1FlRH8yDOmFPKkkKLUv/f0GKcuRswHD/vV6CFD7nszmWuhn7CvWk5hnKyYjl625e +f4Z2oArJ9dDBvNaRhRNsnQOvcJOKqRMp43yTK5VpYi7ux9qwbfvi/bDXa6XLvb5f +STELF/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 -MTQxMDU0MjNaFw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PTGvllAgZsHGfNU37wtxR7Uqbfb -2SetRZBikZmVMdZkgIagdq6GDlloJnJY/cXtFPpOyJT1RgeuYlW06GzJH40V +DTALBgNVBAMMBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq +tVa3cNoloHn8KLMLgdqpSqEmX/qQw32Zbj70XnzMPps02thn58aX37XIYhrvvPCq +WHBzZRLOLqneHkvlvW1G1Sgu5JHue/6zNy18+ZY1PvZ6NrVtvbRM0w2mN0OJYYUa +9zA7v6Z0UjrNANXIfvLC5OZJZgB5xRt7rIkC4L3haUM09J0Z2JCYgjd33g1tNpLk +Zt6AJ5BF9tYzITu4b/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 -BPHSMicJfVEtxHYsM3aKhp2Cp3+aKDQIbcV/b9XrojRKpGjtwVWvVMXQi/83O486 -9/tS9hjiksawPhN5nNlMbtJHfFHRjsb6tBaRktTuUAeTGcf+Wsb2GtkczrzgCZC2 -tS3n/qZLvvzeSIPhdI6xQEG5NiWj+EYDd5O1jS2m61xLEjV8Kykq8sugrAwzuc7z -c3VLHPrTwbqRLvcwY/epf7RWn7dz9rGynhWfIbc7qyWEHrEKgekPgTRgfwn45bac -arrNlV/3HM6OW67tdaHFWI3wPBXhtsL4UyAY4X+ghVR8Qw78nH9Iw0D+OxaV5lco -tRflMBYTygjjI0rSxjEyiGyJaIW7LwzIsKOmHwM93cecd+mMqtpGbAGaBeenpzpJ -e49JajUNB717prMa1q3ovPvo8w96FrDwJZJnrEnwTU5QUF2S3hWrfBBpHjemTtCp -tAeRlDw2eJfN7UEnfwrU3sOITEeCE8jV3yMAPbNRPnlM7i/4GwGF7EHdFmg48W5X -NFI1Vk7oZkJ6pCLDRst1ZV9fljCF06rH+WfxeH0l4epFg0wEVlFq/lC+ra3fz3US -669VJuJ7O0VMN6vPCaENcEkpUp5ZKh/yKL3FDv0d+lGkjJpWlUMfGkId10Hsv9a3 -S0A24q9er8oJaKzNUfvuJsJQEdORMLAckqTZ1gXUMf2o2oIC0uhKI/qp3zUtzIAK -cjPt3dL17ZZml3YWxI9I6XS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ZPIxOLdYQLaCgPXzbvvNyB95fAzswez1SzNCGwyC8mTfHX/ghsFMT9qYD +xQQ+CYMuAEdQQcYlxF3s6iVt5fbLYGFzh6yfOKqiGTo/e9AcnwCdOcT3wZsiKCIe +YA4eaJEv6tgUzmdABoreF7PrNqHWcWzETnKQgp0jOTc+BExAGE6NkC8ylj2ku59z +ZApl3hr3qNLjb6q64vfLl1RWICd43TsYX0CBTSEmYRYLs37fV1bhBGVzo9jJVs7I +eNUVs9dI3k+zQuDFKhlIyX7kB90i0nGNE/q4TOagB/pM0pRFfnjyLbpr/7PzzhFT +6y/sbfD8yTfiKLXoV3i9MMRSUxXrGL11vOtwF8iBdw29y7QH2xBAHrF71+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 -YqGCXFhnYLC83Zb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QABo1MwUTAdBgNVHQ4EFgQUxTdl +EGjQiZKQjcB+ZATyYPdCN0kwHwYDVR0jBBgwFoAUxTdlEGjQiZKQjcB+ZATyYPdC +N0kwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEALtwnPMIE5wAr +ZQ+qt1SSC3mjK6+jvr3YphfKh7gMuXlxJPRyk/zwowyDYut8fy2VVZnz7kjD5UOu +Css8ypJMwLo7lJ0Ormr7swbvZFgNqzWWRarPbHqbBsand4jpoF0rsJMJKcgmrQpe +MReAsGEDJVQhMiMeY+KDCNDNMB6NhNiNYesTWcwMGMkKIP4x+jbsPLwztLpnn+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----- diff --git a/test/test_bdecode.cpp b/test/test_bdecode.cpp index 5ff0e7b5d8a..b046a3f52ac 100644 --- a/test/test_bdecode.cpp +++ b/test/test_bdecode.cpp @@ -1178,7 +1178,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 772860f0c21..62eeb576801 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -283,7 +283,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; } @@ -3194,7 +3194,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 a7d9cc757ef..7239fd5d10e 100644 --- a/test/test_http_parser.cpp +++ b/test/test_http_parser.cpp @@ -725,7 +725,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 e09c4c2eb2a..fee4df193a2 100644 --- a/test/test_peer_list.cpp +++ b/test/test_peer_list.cpp @@ -366,7 +366,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(); @@ -1184,6 +1184,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 diff --git a/test/test_piece_picker.cpp b/test/test_piece_picker.cpp index ff2563c8c6b..9f3930a24f5 100644 --- a/test/test_piece_picker.cpp +++ b/test/test_piece_picker.cpp @@ -416,7 +416,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); @@ -1359,7 +1359,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 @@ -1653,7 +1653,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 @@ -2795,7 +2795,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 f19c83af3f5..1e237e20b15 100644 --- a/test/test_privacy.cpp +++ b/test/test_privacy.cpp @@ -92,7 +92,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 23e5320a350..013e4d93b5f 100644 --- a/test/test_remap_files.cpp +++ b/test/test_remap_files.cpp @@ -150,7 +150,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 16eb2e9518c..8f42af86c2b 100644 --- a/test/test_resume.cpp +++ b/test/test_resume.cpp @@ -1718,7 +1718,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) { @@ -1729,7 +1729,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 3147bac4005..9cdab7800d1 100644 --- a/test/test_similar_torrent.cpp +++ b/test/test_similar_torrent.cpp @@ -260,7 +260,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 ba67640c853..282f1f74b5f 100644 --- a/test/test_ssl.cpp +++ b/test/test_ssl.cpp @@ -283,8 +283,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 5b72d873f89..6f01389a991 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -821,7 +821,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 @@ -1292,7 +1292,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); @@ -1354,6 +1354,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, ifno] = setup_torrent(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) { @@ -1365,6 +1407,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) @@ -1377,6 +1424,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; diff --git a/test/test_string.cpp b/test/test_string.cpp index 4ace14bb4cf..39123eb57d5 100644 --- a/test/test_string.cpp +++ b/test/test_string.cpp @@ -202,7 +202,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 cab50a9d6e1..6b931c4dcaa 100644 --- a/test/test_torrent_info.cpp +++ b/test/test_torrent_info.cpp @@ -1098,7 +1098,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 bee2d89ffba..0f587e02a02 100644 --- a/test/test_tracker.cpp +++ b/test/test_tracker.cpp @@ -817,7 +817,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); 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 []