mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
don't check for the CA cert bundle if --insecure is used
This commit is contained in:
parent
b0b50bd12a
commit
e7dd7c54ff
10
src/main.c
10
src/main.c
@ -2464,17 +2464,19 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
* We support the environment variable thing for non-Windows platforms
|
||||
* too. Just for the sake of it.
|
||||
*/
|
||||
if (! config->cacert) {
|
||||
if (!config->cacert &&
|
||||
!config->capath &&
|
||||
!config->insecure_ok) {
|
||||
env = curl_getenv("CURL_CA_BUNDLE");
|
||||
if(env) {
|
||||
GetStr(&config->cacert, env);
|
||||
free(env);
|
||||
}
|
||||
}
|
||||
#if defined(WIN32) && !defined(__CYGWIN32__)
|
||||
if (! config->cacert)
|
||||
FindWin32CACert(config, "curl-ca-bundle.crt");
|
||||
else
|
||||
FindWin32CACert(config, "curl-ca-bundle.crt");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (config->postfields) {
|
||||
if (config->use_httpget) {
|
||||
|
Loading…
Reference in New Issue
Block a user