curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Resetting CURLOPT_PROXY_CAINFO to default

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 10 May 2022 16:57:20 +0200 (CEST)

On Tue, 10 May 2022, Taw via curl-library wrote:

> I know that the option CURLOPT_PROXY can be reset to default by using NULL
> as a parameter.But how can this be achieved with CURLOPT_PROXY_CAINFO? I
> want to reset it to default, meaning: "system path where libcurl's cacert
> bundle is assumed to be stored" My use case is that I have a button in my
> app: reset proxy values to default, but I don't know how to
> reset CURLOPT_PROXY_CAINFO.

There actually is no way to reset these CURLOPT_CAINFO or CURLOPT_PROXY_CAINFO
back to default once you've changed them.

They are by default set to the path that was detected at build-time, but once
you have changed any of them there is no logic to reset it back to the
original value.

So, the way to reset them would be to create a new easy handle for which you
do *not* set that option.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-05-10