KeeShare uses only one flag - checks for QuaZip

Changed flag for KeeShare to
* enable insecure sharing in all cases
* enable secure sharing if QuaZip was found
This commit is contained in:
Christian Kieschnick 2019-01-04 09:33:00 +01:00
parent 3d02013513
commit 080b02e9d5
3 changed files with 20 additions and 18 deletions

View File

@ -47,8 +47,7 @@ option(WITH_XC_NETWORKING "Include networking code (e.g. for downlading website
option(WITH_XC_BROWSER "Include browser integration with keepassxc-browser." OFF)
option(WITH_XC_YUBIKEY "Include YubiKey support." OFF)
option(WITH_XC_SSHAGENT "Include SSH agent support." OFF)
option(WITH_XC_KEESHARE_INSECURE "Sharing integration with KeeShare with insecure sources" OFF)
option(WITH_XC_KEESHARE_SECURE "Sharing integration with KeeShare with secure sources" OFF)
option(WITH_XC_KEESHARE "Sharing integration with KeeShare" OFF)
if(APPLE)
option(WITH_XC_TOUCHID "Include TouchID support for macOS." OFF)
endif()
@ -60,20 +59,12 @@ if(WITH_XC_ALL)
set(WITH_XC_BROWSER ON)
set(WITH_XC_YUBIKEY ON)
set(WITH_XC_SSHAGENT ON)
set(WITH_XC_KEESHARE_INSECURE ON)
set(WITH_XC_KEESHARE_SECURE ON)
set(WITH_XC_KEESHARE ON)
if(APPLE)
set(WITH_XC_TOUCHID ON)
endif()
endif()
if(WITH_XC_KEESHARE_INSECURE OR WITH_XC_KEESHARE_SECURE)
set(WITH_XC_KEESHARE ON)
else()
set(WITH_XC_KEESHARE OFF)
endif()
if(WITH_XC_SSHAGENT OR WITH_XC_KEESHARE)
set(WITH_XC_CRYPTO_SSH ON)
else()
@ -367,10 +358,21 @@ endif()
include_directories(SYSTEM ${ARGON2_INCLUDE_DIR})
# Optional
if(WITH_XC_KEESHARE_SECURE)
find_package(QuaZip REQUIRED)
if(WITH_XC_KEESHARE)
find_package(QuaZip QUIET)
if(QuaZip_FOUND)
message(STATUS "Found QuaZip - allow KeeShare with secure container\n")
set(WITH_XC_KEESHARE_INSECURE ON)
set(WITH_XC_KEESHARE_SECURE ON)
include_directories(SYSTEM ${QUAZIP_INCLUDE_DIR})
else()
message(STATUS "No QuaZip - restrict KeeShare to insecure container\n")
set(WITH_XC_KEESHARE_INSECURE ON)
set(WITH_XC_KEESHARE_SECURE OFF)
endif()
else()
set(WITH_XC_KEESHARE_INSECURE OFF)
set(WITH_XC_KEESHARE_SECURE OFF)
endif()
# Optional

View File

@ -202,7 +202,7 @@ add_feature_info(Auto-Type WITH_XC_AUTOTYPE "Automatic password typing")
add_feature_info(Networking WITH_XC_NETWORKING "Compile KeePassXC with network access code (e.g. for downloading website icons)")
add_feature_info(KeePassXC-Browser WITH_XC_BROWSER "Browser integration with KeePassXC-Browser")
add_feature_info(SSHAgent WITH_XC_SSHAGENT "SSH agent integration compatible with KeeAgent")
add_feature_info(KeeShare-Insecure WITH_XC_KEESHARE_INSECURE "Sharing integration with KeeShare with insecure sources")
add_feature_info(KeeShare-Insecure WITH_XC_KEESHARE_INSECURE "Sharing integration with KeeShare restricted to insecure sources")
add_feature_info(KeeShare-Secure WITH_XC_KEESHARE_SECURE "Sharing integration with KeeShare with secure sources")
add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")
if(APPLE)

View File

@ -91,9 +91,9 @@ AboutDialog::AboutDialog(QWidget* parent)
#if defined(WITH_XC_KEESHARE_SECURE) && defined(WITH_XC_KEESHARE_INSECURE)
extensions += "\n- " + tr("KeeShare (secure and insecure sharing)");
#elif defined(WITH_XC_KEESHARE_SECURE)
extensions += "\n- " + tr("KeeShare (secure sharing)");
extensions += "\n- " + tr("KeeShare (only secure sharing)");
#elif defined(WITH_XC_KEESHARE_INSECURE)
extensions += "\n- " + tr("KeeShare (insecure sharing)");
extensions += "\n- " + tr("KeeShare (only insecure sharing)");
#endif
#ifdef WITH_XC_YUBIKEY
extensions += "\n- " + tr("YubiKey");