CURLINFO_CAPATH/CAINFO: get the default CA paths from libcurl

Closes #8888
This commit is contained in:
Daniel Stenberg 2022-05-23 08:42:23 +02:00
parent 3c8b969de6
commit 7bc785387d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 166 additions and 9 deletions

View file

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -164,6 +164,20 @@ static CURLcode getinfo_char(struct Curl_easy *data, CURLINFO info,
case CURLINFO_SCHEME:
*param_charp = data->info.conn_scheme;
break;
case CURLINFO_CAPATH:
#ifdef CURL_CA_PATH
*param_charp = CURL_CA_PATH;
#else
*param_charp = NULL;
#endif
break;
case CURLINFO_CAINFO:
#ifdef CURL_CA_BUNDLE
*param_charp = CURL_CA_BUNDLE;
#else
*param_charp = NULL;
#endif
break;
default:
return CURLE_UNKNOWN_OPTION;