Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

📌 Fix for Botan 2.11+ #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.1)

project(QtShadowsocks
VERSION 2.1.0
VERSION 2.1.0.1
LANGUAGES CXX)

option(BUILD_SHARED_LIBS "Build ${PROJECT_NAME} as a shared library" ON)
Expand Down Expand Up @@ -31,6 +31,10 @@ pkg_search_module(BOTAN REQUIRED botan-2>=2.3.0 botan-1.10)
if(BOTAN_VERSION VERSION_GREATER 2.0)
message(STATUS "Botan-2 is found and will be used in this build")
add_definitions(-DUSE_BOTAN2)
if(BOTAN_VERSION VERSION_GREATER_EQUAL 2.11.0)
message(STATUS "Botan-2 Version 2.11+ is found and will be used in this build")
add_definitions(-DUSE_BOTAN211P)
endif()
else()
message(DEPRECATION "Botan-1.10 is found and will be used in this build. However, Botan-1.10 is deprecated and should not be used if possible")
endif()
Expand Down
4 changes: 4 additions & 0 deletions lib/crypto/cipher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
#include <botan/sha160.h>
#endif

#ifdef USE_BOTAN211P
#include <botan/filters.h>
#endif

#include <QCryptographicHash>
#include <QDebug>
#include <QMessageAuthenticationCode>
Expand Down