diff --git a/libs/client-sdk/src/client_impl.cpp b/libs/client-sdk/src/client_impl.cpp index 79ab4d63e..9e2f66075 100644 --- a/libs/client-sdk/src/client_impl.cpp +++ b/libs/client-sdk/src/client_impl.cpp @@ -109,6 +109,16 @@ ClientImpl::ClientImpl(Config in_cfg, eval_reasons_available_(config_.DataSourceConfig().with_reasons) { flag_manager_.LoadCache(context_); + if (auto custom_ca = http_properties_.Tls().CustomCAFile()) { + LD_LOG(logger_, LogLevel::kInfo) + << "TLS peer verification configured with custom CA file: " + << *custom_ca; + } + if (http_properties_.Tls().PeerVerifyMode() == + config::shared::built::TlsOptions::VerifyMode::kVerifyNone) { + LD_LOG(logger_, LogLevel::kInfo) << "TLS peer verification disabled"; + } + if (config_.Events().Enabled() && !config_.Offline()) { event_processor_ = std::make_unique>( diff --git a/libs/client-sdk/src/data_sources/polling_data_source.cpp b/libs/client-sdk/src/data_sources/polling_data_source.cpp index 6fab0f845..762e7dce0 100644 --- a/libs/client-sdk/src/data_sources/polling_data_source.cpp +++ b/libs/client-sdk/src/data_sources/polling_data_source.cpp @@ -88,15 +88,6 @@ PollingDataSource::PollingDataSource( auto const& polling_config = std::get< config::shared::built::PollingConfig>( data_source_config.method); - if (http_properties.Tls().CustomCAFile()) { - LD_LOG(logger_, LogLevel::kDebug) - << "TLS peer verification configured with custom CA file: " - << *http_properties.Tls().CustomCAFile(); - } - if (http_properties.Tls().PeerVerifyMode() == - config::shared::built::TlsOptions::VerifyMode::kVerifyNone) { - LD_LOG(logger_, LogLevel::kDebug) << "TLS peer verification disabled"; - } if (polling_interval_ < polling_config.min_polling_interval) { LD_LOG(logger_, LogLevel::kWarn) << "Polling interval too frequent, defaulting to " diff --git a/libs/server-sdk/src/client_impl.cpp b/libs/server-sdk/src/client_impl.cpp index f176f4dc4..37eaf1b18 100644 --- a/libs/server-sdk/src/client_impl.cpp +++ b/libs/server-sdk/src/client_impl.cpp @@ -8,6 +8,7 @@ #include "data_interfaces/system/idata_system.hpp" +#include #include #include #include @@ -124,6 +125,17 @@ ClientImpl::ClientImpl(Config config, std::string const& version) EventFactory::WithReasons()) { LD_LOG(logger_, LogLevel::kDebug) << "data system: " << data_system_->Identity(); + if (auto custom_ca = http_properties_.Tls().CustomCAFile()) { + LD_LOG(logger_, LogLevel::kInfo) + << "TLS peer verification configured with custom CA file: " + << *custom_ca; + } + if (http_properties_.Tls().PeerVerifyMode() == + launchdarkly::config::shared::built::TlsOptions::VerifyMode:: + kVerifyNone) { + LD_LOG(logger_, LogLevel::kInfo) << "TLS peer verification disabled"; + } + run_thread_ = std::move(std::thread([&]() { ioc_.run(); })); } diff --git a/libs/server-sdk/src/data_systems/background_sync/sources/polling/polling_data_source.cpp b/libs/server-sdk/src/data_systems/background_sync/sources/polling/polling_data_source.cpp index 38192f5ee..a0d830843 100644 --- a/libs/server-sdk/src/data_systems/background_sync/sources/polling/polling_data_source.cpp +++ b/libs/server-sdk/src/data_systems/background_sync/sources/polling/polling_data_source.cpp @@ -57,11 +57,6 @@ PollingDataSource::PollingDataSource( request_(MakeRequest(data_source_config, endpoints, http_properties)), timer_(ioc), sink_(nullptr) { - if (http_properties.Tls().PeerVerifyMode() == - launchdarkly::config::shared::built::TlsOptions::VerifyMode:: - kVerifyNone) { - LD_LOG(logger_, LogLevel::kDebug) << "TLS peer verification disabled"; - } if (polling_interval_ < data_source_config.min_polling_interval) { LD_LOG(logger_, LogLevel::kWarn) << "Polling interval too frequent, defaulting to " diff --git a/libs/server-sent-events/src/client.cpp b/libs/server-sent-events/src/client.cpp index fa3b3d006..4f104c264 100644 --- a/libs/server-sent-events/src/client.cpp +++ b/libs/server-sent-events/src/client.cpp @@ -629,14 +629,10 @@ std::shared_ptr Builder::build() { if (custom_ca_file_) { assert(!custom_ca_file_->empty()); ssl->load_verify_file(*custom_ca_file_); - logging_cb_( - "TLS peer verification configured with custom CA file: " + - *custom_ca_file_); } if (skip_verify_peer_) { ssl->set_verify_mode(ssl::context::verify_none); - logging_cb_("TLS peer verification disabled"); } }