mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
tool_operate: avoid explicitly setting verifypeer to 1
Also for the proxy verison. It is the default, just like verifyhost, since a long time. Closes #13704
This commit is contained in:
parent
302bcd0838
commit
96a4cad46a
@ -1731,15 +1731,12 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||
my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
|
||||
my_setopt_str(curl, CURLOPT_PROXY_SSLKEYTYPE,
|
||||
config->proxy_key_type);
|
||||
|
||||
/* libcurl default is strict verifyhost -> 1L, verifypeer -> 1L */
|
||||
if(config->insecure_ok) {
|
||||
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
}
|
||||
else {
|
||||
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
|
||||
/* libcurl default is strict verifyhost -> 2L */
|
||||
/* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
|
||||
}
|
||||
|
||||
if(config->doh_insecure_ok) {
|
||||
my_setopt(curl, CURLOPT_DOH_SSL_VERIFYPEER, 0L);
|
||||
@ -1750,9 +1747,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
|
||||
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
|
||||
}
|
||||
else {
|
||||
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 1L);
|
||||
}
|
||||
|
||||
if(config->verifystatus)
|
||||
my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
|
||||
|
Loading…
Reference in New Issue
Block a user