mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
Patrick Bihan-Faou's verifyhost addition
This commit is contained in:
parent
0553ab8181
commit
dcfb10fb31
@ -448,6 +448,11 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
CINIT(HTTPGET, LONG, 80),
|
CINIT(HTTPGET, LONG, 80),
|
||||||
|
|
||||||
|
/* Set if we should verify the Common name from the peer certificate in ssl
|
||||||
|
* handshake, set 1 to check existence, 2 to ensure that it matches the
|
||||||
|
* provided hostname. */
|
||||||
|
CINIT(SSL_VERIFYHOST, LONG, 81),
|
||||||
|
|
||||||
CURLOPT_LASTENTRY /* the last unusued */
|
CURLOPT_LASTENTRY /* the last unusued */
|
||||||
} CURLoption;
|
} CURLoption;
|
||||||
|
|
||||||
|
@ -1881,7 +1881,10 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
/* available from libcurl 7.5: */
|
/* available from libcurl 7.5: */
|
||||||
curl_easy_setopt(curl, CURLOPT_CAINFO, config->cacert);
|
curl_easy_setopt(curl, CURLOPT_CAINFO, config->cacert);
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
|
||||||
|
|
||||||
if(config->conf&(CONF_NOBODY|CONF_USEREMOTETIME)) {
|
if(config->conf&(CONF_NOBODY|CONF_USEREMOTETIME)) {
|
||||||
/* no body or use remote time */
|
/* no body or use remote time */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user