Skip to content

Commit 1b4ed1c

Browse files
committed
when building against OpenSSL, require at least version 3.0.0
1 parent 5bd8266 commit 1b4ed1c

File tree

4 files changed

+9
-32
lines changed

4 files changed

+9
-32
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
2.0.12
22

3+
* when building against OpenSSL, require at least version 3.0.0
34
* add setting to set no-copy-on-write flag on new files
45
* add performance counters to file pool
56
* add high_priority flag to torrent_handle::force_reannounce()

appveyor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ branches:
55
- RC_2_0
66
- RC_1_2
77
- RC_1_1
8-
image: Visual Studio 2017
8+
image: Visual Studio 2022
99
clone_depth: 1
1010
environment:
1111
matrix:
@@ -18,11 +18,11 @@ environment:
1818
lib: 1
1919
- cmake: 1
2020
- variant: release
21-
compiler: msvc-14.1
21+
compiler: msvc-14.3
2222
model: 64
2323
crypto: openssl
24-
ssl_lib: c:\OpenSSL-v111-Win64\lib
25-
ssl_include: c:\OpenSSL-v111-Win64\include
24+
ssl_lib: c:\OpenSSL-v36-Win64\lib
25+
ssl_include: c:\OpenSSL-v36-Win64\include
2626
tests: 1
2727

2828
artifacts:
@@ -39,12 +39,12 @@ install:
3939
- if not defined ssl_lib ( set ssl_lib=c:\ )
4040
- if not defined ssl_include ( set ssl_include=c:\ )
4141
- cd %ROOT_DIRECTORY%
42-
- set BOOST_ROOT=c:\Libraries\boost_1_69_0
42+
- set BOOST_ROOT=c:\Libraries\boost_1_85_0
4343
- set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
4444
- echo %BOOST_ROOT%
4545
- echo %BOOST_BUILD_PATH%
4646
- set PATH=%PATH%;%BOOST_BUILD_PATH%
47-
- 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'
47+
- ps: '"using msvc : 14.3 ;`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'
4848
- type %HOMEDRIVE%%HOMEPATH%\user-config.jam
4949
- cd %ROOT_DIRECTORY%
5050
- set PATH=c:\msys64\mingw32\bin;%PATH%

include/libtorrent/ssl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ POSSIBILITY OF SUCH DAMAGE.
5454

5555
#ifdef TORRENT_USE_OPENSSL
5656
#include <openssl/opensslv.h> // for OPENSSL_VERSION_NUMBER
57-
#if OPENSSL_VERSION_NUMBER < 0x1000000fL
58-
#error OpenSSL too old, use a recent version with SNI support
57+
#if OPENSSL_VERSION_NUMBER < 0x30000000L
58+
#error OpenSSL too old, libtorrent requires at least OpenSSL 3.0.0 or later
5959
#endif
6060
#ifdef TORRENT_WINDOWS
6161
// because openssl includes winsock.h, we must include winsock2.h first

src/ssl.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -178,31 +178,7 @@ namespace {
178178
{
179179
lifecycle()
180180
{
181-
// this is needed for openssl < 1.0 to decrypt keys created by openssl 1.0+
182-
#if !defined(OPENSSL_API_COMPAT) || (OPENSSL_API_COMPAT < 0x10100000L)
183-
OpenSSL_add_all_algorithms();
184-
#else
185181
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, nullptr);
186-
#endif
187-
}
188-
189-
~lifecycle()
190-
{
191-
// by openssl changelog at https://www.openssl.org/news/changelog.html
192-
// Changes between 1.0.2h and 1.1.0 [25 Aug 2016]
193-
// - Most global cleanup functions are no longer required because they are handled
194-
// via auto-deinit. Affected function CRYPTO_cleanup_all_ex_data()
195-
#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < 0x10100000L
196-
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
197-
#pragma clang diagnostic push
198-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
199-
#endif
200-
// openssl requires this to clean up internal structures it allocates
201-
CRYPTO_cleanup_all_ex_data();
202-
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
203-
#pragma clang diagnostic pop
204-
#endif
205-
#endif
206182
}
207183
} global;
208184
}

0 commit comments

Comments
 (0)