Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) # Configurable policies: <= CMP0097
cmake_minimum_required(VERSION 3.20.0 FATAL_ERROR) # Configurable policies: <= CMP0097

cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0092 NEW)
Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2.0.12

* when building against OpenSSL, require at least version 1.1.1
* add setting to set no-copy-on-write flag on new files
* add performance counters to file pool
* add high_priority flag to torrent_handle::force_reannounce()
Expand Down
16 changes: 8 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branches:
- RC_2_0
- RC_1_2
- RC_1_1
image: Visual Studio 2017
image: Visual Studio 2022
clone_depth: 1
environment:
matrix:
Expand All @@ -18,11 +18,11 @@ environment:
lib: 1
- cmake: 1
- variant: release
compiler: msvc-14.1
compiler: msvc
model: 64
crypto: openssl
ssl_lib: c:\OpenSSL-v111-Win64\lib
ssl_include: c:\OpenSSL-v111-Win64\include
ssl_lib: c:\OpenSSL-v36-Win64\lib\VC\x64\MT
ssl_include: c:\OpenSSL-v36-Win64\include
tests: 1

artifacts:
Expand All @@ -39,12 +39,12 @@ install:
- if not defined ssl_lib ( set ssl_lib=c:\ )
- if not defined ssl_include ( set ssl_include=c:\ )
- cd %ROOT_DIRECTORY%
- set BOOST_ROOT=c:\Libraries\boost_1_69_0
- set BOOST_ROOT=c:\Libraries\boost_1_89_0
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
- echo %BOOST_ROOT%
- echo %BOOST_BUILD_PATH%
- set PATH=%PATH%;%BOOST_BUILD_PATH%
- ps: '"using msvc : 14.1 ;`nusing gcc ;`nusing python : 3.8 : c:\\Python38-x64 : c:\\Python38-x64\\include : c:\\Python38-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- ps: '"using msvc ;`nusing gcc ;`nusing python : 3.13 : c:\\Python313-x64 : c:\\Python313-x64\\include : c:\\Python313-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
- cd %ROOT_DIRECTORY%
- set PATH=c:\msys64\mingw32\bin;%PATH%
Expand Down Expand Up @@ -88,11 +88,11 @@ build_script:
# and stage it for cmake to pick up
- if defined cmake (
cd %BOOST_ROOT% &&
bjam cxxstd=14 release --with-python --with-system --layout=system address-model=64 link=shared stage &&
b2 cxxstd=14 release --with-python --with-system --layout=system address-model=64 link=shared stage &&
cd %ROOT_DIRECTORY% &&
mkdir build &&
cd build &&
cmake -DBOOST_LIBRARYDIR=%BOOST_ROOT%\stage\lib -DCMAKE_CXX_STANDARD=14 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 15 2017" -A x64 .. &&
cmake -DBOOST_LIBRARYDIR=%BOOST_ROOT%\stage\lib -DCMAKE_CXX_STANDARD=14 -Dbuild_tests=ON -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=%python% -Dboost-python-module-name="python" -Dskip-python-runtime-test=true -DPython_ADDITIONAL_VERSIONS="2.7" -G "Visual Studio 17 2022" -A x64 .. &&
cmake --build . --config Release --parallel %NUMBER_OF_PROCESSORS% -- -verbosity:minimal
)

Expand Down
2 changes: 1 addition & 1 deletion examples/cmake/FindLibtorrentRasterbar.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function(_try_generic_mode)

list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL _ENCRYPTION_INDEX)
if(_ENCRYPTION_INDEX GREATER -1)
find_package(OpenSSL QUIET REQUIRED)
find_package(OpenSSL 1.1.1 QUIET REQUIRED)
list(APPEND LibtorrentRasterbar_LIBRARIES OpenSSL::SSL)
if (LibtorrentRasterbar_USE_STATIC_LIBS)
list(APPEND LibtorrentRasterbar_LIBRARIES OpenSSL::Crypto)
Expand Down
4 changes: 2 additions & 2 deletions include/libtorrent/ssl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ POSSIBILITY OF SUCH DAMAGE.

#ifdef TORRENT_USE_OPENSSL
#include <openssl/opensslv.h> // for OPENSSL_VERSION_NUMBER
#if OPENSSL_VERSION_NUMBER < 0x1000000fL
#error OpenSSL too old, use a recent version with SNI support
#if OPENSSL_VERSION_NUMBER < 0x1010100fL
#error OpenSSL too old, libtorrent requires least OpenSSL 1.1.1 or later
#endif
#ifdef TORRENT_WINDOWS
// because openssl includes winsock.h, we must include winsock2.h first
Expand Down
24 changes: 0 additions & 24 deletions src/ssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,31 +178,7 @@ namespace {
{
lifecycle()
{
// this is needed for openssl < 1.0 to decrypt keys created by openssl 1.0+
#if !defined(OPENSSL_API_COMPAT) || (OPENSSL_API_COMPAT < 0x10100000L)
OpenSSL_add_all_algorithms();
#else
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, nullptr);
#endif
}

~lifecycle()
{
// by openssl changelog at https://www.openssl.org/news/changelog.html
// Changes between 1.0.2h and 1.1.0 [25 Aug 2016]
// - Most global cleanup functions are no longer required because they are handled
// via auto-deinit. Affected function CRYPTO_cleanup_all_ex_data()
#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < 0x10100000L
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
// openssl requires this to clean up internal structures it allocates
CRYPTO_cleanup_all_ex_data();
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
#pragma clang diagnostic pop
#endif
#endif
}
} global;
}
Expand Down
Loading