cmake: Add default CA path /var/ssl/certs on AIX

Extend commit 0abd3e538e (cmake: Use a default CA path when not using
system curl, 2015-01-22, v3.2.0-rc1~66^2) to cover AIX.
This commit is contained in:
Brad King
2024-09-26 13:18:23 -04:00
parent 53f3e5da1e
commit 5a06872f1e

View File

@@ -152,6 +152,15 @@ std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile)
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
}
# undef CMAKE_CAPATH_COMMON
# ifdef _AIX
# define CMAKE_CAPATH_AIX "/var/ssl/certs"
if (cmSystemTools::FileIsDirectory(CMAKE_CAPATH_AIX)) {
::CURLcode res =
::curl_easy_setopt(curl, CURLOPT_CAPATH, CMAKE_CAPATH_AIX);
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
}
# undef CMAKE_CAPATH_AIX
# endif
}
#endif
return e;