diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-05-23 08:42:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-05-23 08:44:29 +0200 |
commit | 7bc785387d631ca05bebaa20a32aa0f7e723a024 (patch) | |
tree | a1e1a10a6f700cb1e311f0f1623771ed83b0ce71 /lib/getinfo.c | |
parent | 3c8b969de64b3015d1cb1280cc1f9b867c944e33 (diff) | |
download | curl-7bc785387d631ca05bebaa20a32aa0f7e723a024.tar.gz |
CURLINFO_CAPATH/CAINFO: get the default CA paths from libcurl
Closes #8888
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 9091e6139..de07e8ae2 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -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; |