|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2019-2023 HERE Europe B.V. |
| 2 | + * Copyright (C) 2019-2024 HERE Europe B.V. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -318,6 +318,33 @@ NetworkCurl::NetworkCurl(NetworkInitializationSettings settings)
|
318 | 318 | "CURL does not support SSL info with blobs, required 7.77.0, detected %s",
|
319 | 319 | LIBCURL_VERSION);
|
320 | 320 | #endif
|
| 321 | + |
| 322 | + std::string curl_ca_info; |
| 323 | + std::string curl_ca_path; |
| 324 | +#if CURL_AT_LEAST_VERSION(7, 70, 0) |
| 325 | + const auto* version_data = curl_version_info(CURLVERSION_NOW); |
| 326 | + curl_ca_path = version_data->capath ? version_data->capath : "<empty>"; |
| 327 | + curl_ca_info = version_data->cainfo ? version_data->cainfo : "<empty>"; |
| 328 | +#else |
| 329 | + curl_ca_path = "<empty>"; |
| 330 | + curl_ca_info = "<empty>"; |
| 331 | +#endif |
| 332 | + |
| 333 | + std::string ca_bundle_path; |
| 334 | +#ifdef OLP_SDK_NETWORK_HAS_OPENSSL |
| 335 | + ca_bundle_path = CaBundlePath(); |
| 336 | + if (ca_bundle_path.empty()) { |
| 337 | + ca_bundle_path = "<empty>"; |
| 338 | + } |
| 339 | +#else |
| 340 | + ca_bundle_path = "<empty>"; |
| 341 | +#endif |
| 342 | + |
| 343 | + OLP_SDK_LOG_INFO_F(kLogTag, |
| 344 | + "Certificate options, curl_ca_path=%s, curl_ca_info=%s, " |
| 345 | + "ca_bundle_path=%s", |
| 346 | + curl_ca_path.c_str(), curl_ca_info.c_str(), |
| 347 | + ca_bundle_path.c_str()); |
321 | 348 | }
|
322 | 349 |
|
323 | 350 | NetworkCurl::~NetworkCurl() {
|
|
0 commit comments