aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-01-30 05:15:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-01-30 05:15:57 +0000
commitf2c60574908106c559e9fd2fea7115e024af0171 (patch)
treec759149a704230c84ac12df2a808d9fff6224597 /src
parent169b2eeb94f7643229ac08fe305876530d40a680 (diff)
curl now uses stricter VERIFYHOST by default and only uses a lesser check
if --insecure is used. Reported by Hamish Mackenzie.
Diffstat (limited to 'src')
-rw-r--r--src/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index efc43f86e..b416e55c1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2828,6 +2828,8 @@ operate(struct Configurable *config, int argc, char *argv[])
curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, config->key_type);
curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, config->key_passwd);
+ /* default to strict verifyhost */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
if(config->cacert || config->capath) {
if (config->cacert)
curl_easy_setopt(curl, CURLOPT_CAINFO, config->cacert);
@@ -2835,15 +2837,13 @@ operate(struct Configurable *config, int argc, char *argv[])
if (config->capath)
curl_easy_setopt(curl, CURLOPT_CAPATH, config->capath);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
}
- else {
- if(config->insecure_ok)
+ else
+ if(config->insecure_ok) {
/* new stuff needed for libcurl 7.10 */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
-
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
- }
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
+ }
if((config->conf&CONF_NOBODY) ||
config->remote_time) {