summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2024-06-27 16:13:45 +0200
committerAndras Timar <andras.timar@collabora.com>2024-06-28 10:52:49 +0200
commitdb94bfd8817a4cb5d4c6c1055c682cf0f3c32af0 (patch)
tree7e053c68369c2cf7f39fa3113fc8bd188a312a8c
parentAdd Normal and Notes view buttons to notebookbar in Impress (diff)
downloadonline-db94bfd8817a4cb5d4c6c1055c682cf0f3c32af0.tar.gz
online-db94bfd8817a4cb5d4c6c1055c682cf0f3c32af0.zip
Instead of ssl.termination, the condition should depend on ssl.enable
So that we fall back from storage.ssl.*_file_path to ssl.*_file_path when ssl.enable=true, because in this case we can expect that these fallbacks exist. Otherwise we do not fall back. ssl.termination does not matter. Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: I6ca86c5ce5849fffcd5c41f0ce2a54977ab50faa
-rw-r--r--wsd/Storage.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 44442f549c..58fa397d4d 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -136,18 +136,18 @@ void StorageBase::initialize()
if (SSLEnabled || SSLAsScheme)
{
- if (COOLWSD::isSSLTermination())
- {
- sslClientParams.certificateFile = COOLWSD::getPathFromConfig("storage.ssl.cert_file_path");
- sslClientParams.privateKeyFile = COOLWSD::getPathFromConfig("storage.ssl.key_file_path");
- sslClientParams.caLocation = COOLWSD::getPathFromConfig("storage.ssl.ca_file_path");
- }
- else
+ if (COOLWSD::isSSLEnabled())
{
sslClientParams.certificateFile = COOLWSD::getPathFromConfigWithFallback("storage.ssl.cert_file_path", "ssl.cert_file_path");
sslClientParams.privateKeyFile = COOLWSD::getPathFromConfigWithFallback("storage.ssl.key_file_path", "ssl.key_file_path");
sslClientParams.caLocation = COOLWSD::getPathFromConfigWithFallback("storage.ssl.ca_file_path", "ssl.ca_file_path");
}
+ else
+ {
+ sslClientParams.certificateFile = COOLWSD::getPathFromConfig("storage.ssl.cert_file_path");
+ sslClientParams.privateKeyFile = COOLWSD::getPathFromConfig("storage.ssl.key_file_path");
+ sslClientParams.caLocation = COOLWSD::getPathFromConfig("storage.ssl.ca_file_path");
+ }
sslClientParams.cipherList = COOLWSD::getPathFromConfigWithFallback("storage.ssl.cipher_list", "ssl.cipher_list");
const bool sslVerification = COOLWSD::getConfigValue<bool>("ssl.ssl_verification", true);
sslClientParams.verificationMode = !sslVerification ? Poco::Net::Context::VERIFY_NONE : Poco::Net::Context::VERIFY_STRICT;