# HG changeset patch # User Alain Mazy # Date 1605174678 -3600 # Node ID 215782cadfc2d47e15230f1840bc8bbde3a086aa # Parent 6f83b74373d340b180f4a03b5bf7a34b83630d71# Parent e712ff3eede3726f8894ccac8e5dc0e72b499e60 merge default -> optimized-routes diff -r 6f83b74373d3 -r 215782cadfc2 Framework/MySQL/MySQLDatabase.cpp --- a/Framework/MySQL/MySQLDatabase.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Framework/MySQL/MySQLDatabase.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -140,7 +140,20 @@ unsigned int protocol = MYSQL_PROTOCOL_TCP; mysql_options(mysql_, MYSQL_OPT_PROTOCOL, (unsigned int *) &protocol); } - + + if (parameters_.IsSsl()) + { + if (parameters_.IsVerifyServerCertificates()) + { + my_bool verifyCert = 1; + mysql_options(mysql_, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (void *) &verifyCert); + mysql_options(mysql_, MYSQL_OPT_SSL_CA, (void *)(parameters_.GetSslCaCertificates())); + } + + my_bool enforceTls = 1; + mysql_options(mysql_, MYSQL_OPT_SSL_ENFORCE, (void *) &enforceTls); + } + const char* socket = (parameters_.GetUnixSocket().empty() ? NULL : parameters_.GetUnixSocket().c_str()); diff -r 6f83b74373d3 -r 215782cadfc2 Framework/MySQL/MySQLParameters.cpp --- a/Framework/MySQL/MySQLParameters.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Framework/MySQL/MySQLParameters.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -52,46 +52,58 @@ } - MySQLParameters::MySQLParameters(const OrthancPlugins::OrthancConfiguration& configuration) + MySQLParameters::MySQLParameters(const OrthancPlugins::OrthancConfiguration& pluginConfiguration, const OrthancPlugins::OrthancConfiguration& orthancConfiguration) { Reset(); std::string s; - if (configuration.LookupStringValue(s, "Host")) + if (pluginConfiguration.LookupStringValue(s, "Host")) { SetHost(s); } - if (configuration.LookupStringValue(s, "Username")) + if (pluginConfiguration.LookupStringValue(s, "Username")) { SetUsername(s); } - if (configuration.LookupStringValue(s, "Password")) + if (pluginConfiguration.LookupStringValue(s, "Password")) { SetPassword(s); } - if (configuration.LookupStringValue(s, "Database")) + if (pluginConfiguration.LookupStringValue(s, "Database")) { SetDatabase(s); } unsigned int port; - if (configuration.LookupUnsignedIntegerValue(port, "Port")) + if (pluginConfiguration.LookupUnsignedIntegerValue(port, "Port")) { SetPort(port); } - if (configuration.LookupStringValue(s, "UnixSocket")) + if (pluginConfiguration.LookupStringValue(s, "UnixSocket")) { SetUnixSocket(s); } - lock_ = configuration.GetBooleanValue("Lock", true); // Use locking by default + lock_ = pluginConfiguration.GetBooleanValue("Lock", true); // Use locking by default + + ssl_ = pluginConfiguration.GetBooleanValue("EnableSsl", false); + verifySslServerCertificates_ = pluginConfiguration.GetBooleanValue("SslVerifyServerCertificates", true); + + const std::string defaultCaCertificates = orthancConfiguration.GetStringValue("HttpsCACertificates", ""); + sslCaCertificates_ = pluginConfiguration.GetStringValue("SslCACertificates", defaultCaCertificates); - maxConnectionRetries_ = configuration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10); - connectionRetryInterval_ = configuration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5); + if (ssl_ && verifySslServerCertificates_ && sslCaCertificates_.empty()) + { + LOG(ERROR) << "MySQL: No SslCACertificates defined, unable to check SSL Server certificates"; + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); + } + + maxConnectionRetries_ = pluginConfiguration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10); + connectionRetryInterval_ = pluginConfiguration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5); } diff -r 6f83b74373d3 -r 215782cadfc2 Framework/MySQL/MySQLParameters.h --- a/Framework/MySQL/MySQLParameters.h Tue Jul 14 09:47:46 2020 +0200 +++ b/Framework/MySQL/MySQLParameters.h Thu Nov 12 10:51:18 2020 +0100 @@ -38,6 +38,9 @@ std::string database_; uint16_t port_; std::string unixSocket_; + bool ssl_; + bool verifySslServerCertificates_; + std::string sslCaCertificates_; bool lock_; unsigned int maxConnectionRetries_; unsigned int connectionRetryInterval_; @@ -47,7 +50,7 @@ public: MySQLParameters(); - MySQLParameters(const OrthancPlugins::OrthancConfiguration& configuration); + MySQLParameters(const OrthancPlugins::OrthancConfiguration& pluginConfiguration, const OrthancPlugins::OrthancConfiguration& orthancConfiguration); const std::string& GetHost() const { @@ -79,6 +82,21 @@ return port_; } + bool IsSsl() const + { + return ssl_; + } + + bool IsVerifyServerCertificates() const + { + return verifySslServerCertificates_; + } + + const char* GetSslCaCertificates() const + { + return sslCaCertificates_.c_str(); + } + void SetHost(const std::string& host); void SetUsername(const std::string& username); diff -r 6f83b74373d3 -r 215782cadfc2 Framework/MySQL/MySQLStatement.cpp --- a/Framework/MySQL/MySQLStatement.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Framework/MySQL/MySQLStatement.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -355,7 +355,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); } - LOG(INFO) << "Preparing MySQL statement: " << sql; + LOG(TRACE) << "Preparing MySQL statement: " << sql; db_.CheckErrorCode(mysql_stmt_prepare(statement_, sql.c_str(), sql.size())); diff -r 6f83b74373d3 -r 215782cadfc2 Framework/Plugins/PluginInitialization.cpp --- a/Framework/Plugins/PluginInitialization.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Framework/Plugins/PluginInitialization.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -45,7 +45,7 @@ const std::string& dbms, bool isIndex) { -#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) // This indicates Orthanc framework >= 1.7.2 +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2) Orthanc::Logging::InitializePluginContext(context); #else Orthanc::Logging::Initialize(context); diff -r 6f83b74373d3 -r 215782cadfc2 MySQL/CMakeLists.txt --- a/MySQL/CMakeLists.txt Tue Jul 14 09:47:46 2020 +0200 +++ b/MySQL/CMakeLists.txt Thu Nov 12 10:51:18 2020 +0100 @@ -26,7 +26,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") execute_process( COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py + ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py ${ORTHANC_PLUGIN_VERSION} "MySQL storage area plugin" OrthancMySQLStorage.dll "MySQL as a database back-end to Orthanc (storage area)" ERROR_VARIABLE Failure @@ -39,7 +39,7 @@ execute_process( COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py + ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py ${ORTHANC_PLUGIN_VERSION} "MySQL index plugin" OrthancMySQLIndex.dll "MySQL as a database back-end to Orthanc (index)" ERROR_VARIABLE Failure diff -r 6f83b74373d3 -r 215782cadfc2 MySQL/NEWS --- a/MySQL/NEWS Tue Jul 14 09:47:46 2020 +0200 +++ b/MySQL/NEWS Thu Nov 12 10:51:18 2020 +0100 @@ -8,6 +8,11 @@ * Added "MaximumConnectionRetries" & "ConnectionRetryInterval" to configure the retries when connecting to the DB at startup * Support of dynamic linking against the system-wide Orthanc framework library +* Added support for TLS connections: 3 new options: + - "EnableSsl" (false by default) + - "SslVerifyServerCertificates" (true by default - inactive if EnableSsl if false) + - "SslCACertificates" (default value is "HttpsCACertificates" from global + Orthanc configuration) Release 2.0 (2019-01-23) diff -r 6f83b74373d3 -r 215782cadfc2 MySQL/Plugins/IndexPlugin.cpp --- a/MySQL/Plugins/IndexPlugin.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/MySQL/Plugins/IndexPlugin.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -65,7 +65,7 @@ try { - OrthancDatabases::MySQLParameters parameters(mysql); + OrthancDatabases::MySQLParameters parameters(mysql, configuration); /* Create the database back-end */ backend_.reset(new OrthancDatabases::MySQLIndex(parameters)); diff -r 6f83b74373d3 -r 215782cadfc2 MySQL/Plugins/StoragePlugin.cpp --- a/MySQL/Plugins/StoragePlugin.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/MySQL/Plugins/StoragePlugin.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -62,7 +62,7 @@ try { - OrthancDatabases::MySQLParameters parameters(mysql); + OrthancDatabases::MySQLParameters parameters(mysql, configuration); OrthancDatabases::StorageBackend::Register (context, new OrthancDatabases::MySQLStorageArea(parameters)); } diff -r 6f83b74373d3 -r 215782cadfc2 PostgreSQL/CMakeLists.txt --- a/PostgreSQL/CMakeLists.txt Tue Jul 14 09:47:46 2020 +0200 +++ b/PostgreSQL/CMakeLists.txt Thu Nov 12 10:51:18 2020 +0100 @@ -26,7 +26,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") execute_process( COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py + ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py ${ORTHANC_PLUGIN_VERSION} "PostgreSQL storage area plugin" OrthancPostgreSQLStorage.dll "PostgreSQL as a database back-end to Orthanc (storage area)" ERROR_VARIABLE Failure @@ -39,7 +39,7 @@ execute_process( COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py + ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py ${ORTHANC_PLUGIN_VERSION} "PostgreSQL index plugin" OrthancPostgreSQLIndex.dll "PostgreSQL as a database back-end to Orthanc (index)" ERROR_VARIABLE Failure diff -r 6f83b74373d3 -r 215782cadfc2 Resources/CMake/DatabasesFrameworkConfiguration.cmake --- a/Resources/CMake/DatabasesFrameworkConfiguration.cmake Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/CMake/DatabasesFrameworkConfiguration.cmake Thu Nov 12 10:51:18 2020 +0100 @@ -53,6 +53,8 @@ ## Configure the Orthanc Framework ##################################################################### +include_directories(${ORTHANC_FRAMEWORK_ROOT}) + if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) @@ -72,8 +74,7 @@ set(ENABLE_MODULE_JOBS OFF) set(ENABLE_MODULE_DICOM OFF) - include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) - include_directories(${ORTHANC_FRAMEWORK_ROOT}/Sources) + include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkConfiguration.cmake) endif() diff -r 6f83b74373d3 -r 215782cadfc2 Resources/CMake/DatabasesFrameworkParameters.cmake --- a/Resources/CMake/DatabasesFrameworkParameters.cmake Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/CMake/DatabasesFrameworkParameters.cmake Thu Nov 12 10:51:18 2020 +0100 @@ -25,7 +25,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake) if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") - include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) + include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) endif() diff -r 6f83b74373d3 -r 215782cadfc2 Resources/CMake/PostgreSQLConfiguration.cmake --- a/Resources/CMake/PostgreSQLConfiguration.cmake Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/CMake/PostgreSQLConfiguration.cmake Thu Nov 12 10:51:18 2020 +0100 @@ -378,7 +378,7 @@ else() set(PostgreSQL_ADDITIONAL_VERSIONS - "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") if (NOT WIN32) foreach (suffix ${PostgreSQL_ADDITIONAL_VERSIONS}) list(APPEND PostgreSQL_ADDITIONAL_SEARCH_PATHS diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- a/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Thu Nov 12 10:51:18 2020 +0100 @@ -110,6 +110,14 @@ set(ORTHANC_FRAMEWORK_MD5 "ce5f689e852b01d3672bd3d2f952a5ef") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.1") set(ORTHANC_FRAMEWORK_MD5 "3c171217f930abe80246997bdbcaf7cc") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.2") + set(ORTHANC_FRAMEWORK_MD5 "328f94dcbd78c169655a13f7ad58a2c2") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.3") + set(ORTHANC_FRAMEWORK_MD5 "3f1ba9502ec7c5449971d3b56087bcde") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.7.4") + set(ORTHANC_FRAMEWORK_MD5 "19fcb7c21876af86546baa048a22c6c0") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.8.0") + set(ORTHANC_FRAMEWORK_MD5 "f8ec7554ef5d23ea4ce474b1e8214de9") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc @@ -125,7 +133,7 @@ endif() endif() -elseif (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") +elseif (ORTHANC_FRAMEWORK_SOURCE STREQUAL "path") message("Using the Orthanc framework from a path of the filesystem. Assuming mainline version.") set(ORTHANC_FRAMEWORK_MAJOR 999) set(ORTHANC_FRAMEWORK_MINOR 999) @@ -175,17 +183,14 @@ ## if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "path") - if (NOT DEFINED ORTHANC_FRAMEWORK_ROOT) + if (NOT DEFINED ORTHANC_FRAMEWORK_ROOT OR + ORTHANC_FRAMEWORK_ROOT STREQUAL "") message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ROOT must provide the path to the sources of Orthanc") endif() if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}) message(FATAL_ERROR "Non-existing directory: ${ORTHANC_FRAMEWORK_ROOT}") endif() - - if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) - message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_FRAMEWORK_ROOT}") - endif() endif() @@ -232,16 +237,6 @@ if (Failure) message(FATAL_ERROR "Error while running Mercurial") endif() - - unset(ORTHANC_FRAMEWORK_ROOT CACHE) - set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework" CACHE - STRING "Path to the Orthanc framework source directory") - - if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) - message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_ROOT}") - endif() - - unset(ORTHANC_ROOT) endif() @@ -252,7 +247,8 @@ ## if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive") - if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE) + if (NOT DEFINED ORTHANC_FRAMEWORK_ARCHIVE OR + ORTHANC_FRAMEWORK_ARCHIVE STREQUAL "") message(FATAL_ERROR "The variable ORTHANC_FRAMEWORK_ARCHIVE must provide the path to the sources of Orthanc") endif() endif() @@ -369,18 +365,45 @@ message(FATAL_ERROR "The Orthanc framework was not uncompressed at the proper location. Check the CMake instructions.") endif() endif() +endif() + + + +## +## Determine the path to the sources of the Orthanc framework +## + +if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "archive" OR + ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR + ORTHANC_FRAMEWORK_SOURCE STREQUAL "web") + if (NOT DEFINED ORTHANC_ROOT OR + NOT DEFINED ORTHANC_FRAMEWORK_MAJOR OR + NOT DEFINED ORTHANC_FRAMEWORK_MINOR OR + NOT DEFINED ORTHANC_FRAMEWORK_REVISION) + message(FATAL_ERROR "Internal error in the DownloadOrthancFramework.cmake file") + endif() unset(ORTHANC_FRAMEWORK_ROOT CACHE) - set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework" CACHE - STRING "Path to the Orthanc framework source directory") - if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) - message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_ROOT}") + if ("${ORTHANC_FRAMEWORK_MAJOR}.${ORTHANC_FRAMEWORK_MINOR}.${ORTHANC_FRAMEWORK_REVISION}" VERSION_LESS "1.7.2") + set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/Core" CACHE + STRING "Path to the Orthanc framework source directory") + set(ENABLE_PLUGINS_VERSION_SCRIPT OFF) + else() + set(ORTHANC_FRAMEWORK_ROOT "${ORTHANC_ROOT}/OrthancFramework/Sources" CACHE + STRING "Path to the Orthanc framework source directory") endif() unset(ORTHANC_ROOT) endif() +if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + if (NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/OrthancException.h OR + NOT EXISTS ${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake) + message(FATAL_ERROR "Directory not containing the source code of the Orthanc framework: ${ORTHANC_FRAMEWORK_ROOT}") + endif() +endif() + ## @@ -425,6 +448,35 @@ message(FATAL_ERROR "Please install the libjsoncpp-dev package") endif() + # Switch to the C++11 standard if the version of JsonCpp is 1.y.z + # (same as variable JSONCPP_CXX11 in the source code of Orthanc) + if (EXISTS ${JSONCPP_INCLUDE_DIR}/json/version.h) + file(STRINGS + "${JSONCPP_INCLUDE_DIR}/json/version.h" + JSONCPP_VERSION_MAJOR1 REGEX + ".*define JSONCPP_VERSION_MAJOR.*") + + if (NOT JSONCPP_VERSION_MAJOR1) + message(FATAL_ERROR "Unable to extract the major version of JsonCpp") + endif() + + string(REGEX REPLACE + ".*JSONCPP_VERSION_MAJOR.*([0-9]+)$" "\\1" + JSONCPP_VERSION_MAJOR ${JSONCPP_VERSION_MAJOR1}) + message("JsonCpp major version: ${JSONCPP_VERSION_MAJOR}") + + if (JSONCPP_VERSION_MAJOR GREATER 0) + message("Switching to C++11 standard, as version of JsonCpp is >= 1.0.0") + if (CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + endif() + else() + message("Unable to detect the major version of JsonCpp, assuming < 1.0.0") + endif() + # Look for mandatory dependency Boost (cf. BoostConfiguration.cmake) include(FindBoost) find_package(Boost COMPONENTS filesystem thread system date_time regex ${ORTHANC_BOOST_COMPONENTS}) @@ -517,8 +569,4 @@ unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) - - if (NOT "${ORTHANC_FRAMEWORK_ROOT}" STREQUAL "") - include_directories(${ORTHANC_FRAMEWORK_ROOT}) - endif() endif() diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/Databases/DatabaseConstraint.cpp --- a/Resources/Orthanc/Databases/DatabaseConstraint.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/Databases/DatabaseConstraint.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -47,6 +47,9 @@ # include #endif +#include + + namespace Orthanc { namespace Plugins diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/Databases/DatabaseConstraint.h --- a/Resources/Orthanc/Databases/DatabaseConstraint.h Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/Databases/DatabaseConstraint.h Thu Nov 12 10:51:18 2020 +0100 @@ -109,7 +109,7 @@ bool mandatory); #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 - DatabaseConstraint(const OrthancPluginDatabaseConstraint& constraint); + explicit DatabaseConstraint(const OrthancPluginDatabaseConstraint& constraint); #endif ResourceType GetLevel() const diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/Databases/ISqlLookupFormatter.cpp --- a/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Thu Nov 12 10:51:18 2020 +0100 @@ -49,6 +49,9 @@ #include "DatabaseConstraint.h" +#include + + namespace Orthanc { static std::string FormatLevel(ResourceType level) diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/LinuxStandardBaseToolchain.cmake --- a/Resources/Orthanc/LinuxStandardBaseToolchain.cmake Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/LinuxStandardBaseToolchain.cmake Thu Nov 12 10:51:18 2020 +0100 @@ -21,11 +21,11 @@ # # Full build, as used on the BuildBot CIS: # -# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../Resources/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -DUSE_LEGACY_LIBICU=ON -DBOOST_LOCALE_BACKEND=icu -DENABLE_PKCS11=ON -G Ninja +# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake ../OrthancServer/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../OrthancFramework/Resources/Toolchains/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -DUSE_LEGACY_LIBICU=ON -DBOOST_LOCALE_BACKEND=icu -DENABLE_PKCS11=ON -G Ninja # # Or, more lightweight version (without libp11 and ICU): # -# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../Resources/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -G Ninja +# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake ../OrthancServer/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../OrthancFramework/Resources/Toolchains/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -G Ninja # INCLUDE(CMakeForceCompiler) diff -r 6f83b74373d3 -r 215782cadfc2 Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h --- a/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Tue Jul 14 09:47:46 2020 +0200 +++ b/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Thu Nov 12 10:51:18 2020 +0100 @@ -779,7 +779,7 @@ void UpdateProgress(float progress); public: - OrthancJob(const std::string& jobType); + explicit OrthancJob(const std::string& jobType); virtual ~OrthancJob() { @@ -1158,9 +1158,9 @@ public: #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 1) - DicomInstance(const OrthancPluginDicomInstance* instance); + explicit DicomInstance(const OrthancPluginDicomInstance* instance); #else - DicomInstance(OrthancPluginDicomInstance* instance); + explicit DicomInstance(OrthancPluginDicomInstance* instance); #endif #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) diff -r 6f83b74373d3 -r 215782cadfc2 SQLite/CMakeLists.txt --- a/SQLite/CMakeLists.txt Tue Jul 14 09:47:46 2020 +0200 +++ b/SQLite/CMakeLists.txt Thu Nov 12 10:51:18 2020 +0100 @@ -11,7 +11,7 @@ set(ORTHANC_FRAMEWORK_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_VERSION "1.4.0") + set(ORTHANC_FRAMEWORK_VERSION "1.7.2") set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_OPTIMAL_VERSION_MAJOR}.${ORTHANC_OPTIMAL_VERSION_MINOR}.${ORTHANC_OPTIMAL_VERSION_REVISION}") endif()