diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2024-05-20 06:37:16 +0000 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2024-05-21 14:59:41 +0300 |
commit | db77efa74d8dec65a8faaab692a0985e2123ddb0 (patch) | |
tree | e2c1421d6da34807438482eab5bed58392d29dac | |
parent | 216f53d4d49e890567ddc1f47c98ae3ccca13207 (diff) |
Revert "curl: allow forcing HTTPS with a build-time option"
This reverts commit a2a319ee4243d3fbbc4e0c4c2d1ac1fcbae2812c.
Reason for revert: We wanted to make the protocol decision dynamic
after all, based on the configured server URL. With the previous
behavior the users are required to build a separate set of binaries,
even if they want to just quickly evaluate or test the license
server using plain HTTP.
Pick-to: 3.1
Task-number: QLS-957
Change-Id: I7a726c1b32afd6aa1a8f130392ba0a0f1d4416c5
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/libs/qlicenseservice/httpclient.cpp | 15 |
3 files changed, 0 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bd6444..9e2d42f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,11 +34,6 @@ if (BUILD_SERVICE_LIB AND NOT DEFINED ENV{OPENSSL_ROOT_DIR}) message(FATAL_ERROR "OPENSSL_ROOT_DIR environment variable is not set. Please set it before configuring.") endif() -option(CURL_FORCE_HTTPS "Force HTTPS as the only allowed protocol for network requests" ON) -if (CURL_FORCE_HTTPS) - add_definitions(-DCURL_FORCE_HTTPS) -endif () - option(STRIP_BINARIES "Strip binaries of unnecessary symbols and debugging information" ON) if (DEFINED ENV{STRIP_BINARIES}) set(STRIP_BINARIES "$ENV{STRIP_BINARIES}" CACHE BOOL "Strip binaries" FORCE) @@ -103,10 +103,6 @@ Windows: set QTLICD_CLIENT_USERNAME=john ``` -By default, the Qt License Service enforces TLS (v1.3 or later) for network requests, so -the on-premises server must support HTTPS. - -This behavior can be changed at build time by setting the CMake option "CURL_FORCE_HTTPS" to "off". # Configuration file summary diff --git a/src/libs/qlicenseservice/httpclient.cpp b/src/libs/qlicenseservice/httpclient.cpp index c9b1ecc..17339d8 100644 --- a/src/libs/qlicenseservice/httpclient.cpp +++ b/src/libs/qlicenseservice/httpclient.cpp @@ -96,11 +96,7 @@ std::map<std::string, std::string> HttpResult::parseHeaders(const std::string &h HttpRequest::HttpRequest(const std::string &url, const std::string &authKey) : m_url(url) , m_delay(0) -#ifdef CURL_FORCE_HTTPS - , m_forceHttps(true) -#else , m_forceHttps(false) -#endif , m_headers(nullptr) { if (!authKey.empty()) { @@ -213,20 +209,9 @@ void HttpRequest::setDelay(uint32_t msecs) m_delay = msecs; } -/* - If \a https it set to \c true, sets the curl option to allow only - HTTPS protocol for this request. - - \note If the daemon is built with \c CURL_FORCE_HTTPS \c on, all requests are - forced to use HTTPS and setting \a https to \c false has no effect. -*/ void HttpRequest::setForceHttps(bool https) { -#ifdef CURL_FORCE_HTTPS - m_forceHttps = true; -#else m_forceHttps = https; -#endif } void HttpRequest::setCaBundlePath(const std::string &path) |