"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/setopt.c" between
curl-7.65.3.tar.xz and curl-7.66.0.tar.xz

About: cURL is a powerful commandline tool to transfer data from or to a server, using one of the supported protocols HTTP(S), FTP(S), SCP, SFTP, TFTP, DICT, TELNET, LDAP(S) or FILE.

setopt.c  (curl-7.65.3.tar.xz):setopt.c  (curl-7.66.0.tar.xz)
skipping to change at line 812 skipping to change at line 812
break; break;
case CURLOPT_HTTP_VERSION: case CURLOPT_HTTP_VERSION:
/* /*
* This sets a requested HTTP version to be used. The value is one of * This sets a requested HTTP version to be used. The value is one of
* the listed enums in curl/curl.h. * the listed enums in curl/curl.h.
*/ */
arg = va_arg(param, long); arg = va_arg(param, long);
if(arg < CURL_HTTP_VERSION_NONE) if(arg < CURL_HTTP_VERSION_NONE)
return CURLE_BAD_FUNCTION_ARGUMENT; return CURLE_BAD_FUNCTION_ARGUMENT;
#ifdef ENABLE_QUIC
if(arg == CURL_HTTP_VERSION_3)
;
else
#endif
#ifndef USE_NGHTTP2 #ifndef USE_NGHTTP2
if(arg >= CURL_HTTP_VERSION_2) if(arg >= CURL_HTTP_VERSION_2)
return CURLE_UNSUPPORTED_PROTOCOL; return CURLE_UNSUPPORTED_PROTOCOL;
#else #else
if(arg > CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) if(arg > CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE)
return CURLE_UNSUPPORTED_PROTOCOL; return CURLE_UNSUPPORTED_PROTOCOL;
if(arg == CURL_HTTP_VERSION_NONE) if(arg == CURL_HTTP_VERSION_NONE)
arg = CURL_HTTP_VERSION_2TLS; arg = CURL_HTTP_VERSION_2TLS;
#endif #endif
data->set.httpversion = arg; data->set.httpversion = arg;
skipping to change at line 1781 skipping to change at line 1786
} }
break; break;
#endif #endif
case CURLOPT_SSL_VERIFYHOST: case CURLOPT_SSL_VERIFYHOST:
/* /*
* Enable verification of the host name in the peer certificate * Enable verification of the host name in the peer certificate
*/ */
arg = va_arg(param, long); arg = va_arg(param, long);
/* Obviously people are not reading documentation and too many thought /* Obviously people are not reading documentation and too many thought
this argument took a boolean when it wasn't and misused it. We thus ban this argument took a boolean when it wasn't and misused it.
1 as a sensible input and we warn about its use. Then we only have the Treat 1 and 2 the same */
2 action internally stored as TRUE. */ data->set.ssl.primary.verifyhost = (bool)((arg & 3) ? TRUE : FALSE);
if(1 == arg) {
failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
data->set.ssl.primary.verifyhost = (0 != arg) ? TRUE : FALSE;
/* Update the current connection ssl_config. */ /* Update the current connection ssl_config. */
if(data->conn) { if(data->conn) {
data->conn->ssl_config.verifyhost = data->conn->ssl_config.verifyhost =
data->set.ssl.primary.verifyhost; data->set.ssl.primary.verifyhost;
} }
break; break;
#ifndef CURL_DISABLE_PROXY #ifndef CURL_DISABLE_PROXY
case CURLOPT_PROXY_SSL_VERIFYHOST: case CURLOPT_PROXY_SSL_VERIFYHOST:
/* /*
* Enable verification of the host name in the peer certificate for proxy * Enable verification of the host name in the peer certificate for proxy
*/ */
arg = va_arg(param, long); arg = va_arg(param, long);
/* Obviously people are not reading documentation and too many thought /* Treat both 1 and 2 as TRUE */
this argument took a boolean when it wasn't and misused it. We thus ban data->set.proxy_ssl.primary.verifyhost = (bool)((arg & 3)?TRUE:FALSE);
1 as a sensible input and we warn about its use. Then we only have the
2 action internally stored as TRUE. */
if(1 == arg) {
failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
data->set.proxy_ssl.primary.verifyhost = (0 != arg)?TRUE:FALSE;
/* Update the current connection proxy_ssl_config. */ /* Update the current connection proxy_ssl_config. */
if(data->conn) { if(data->conn) {
data->conn->proxy_ssl_config.verifyhost = data->conn->proxy_ssl_config.verifyhost =
data->set.proxy_ssl.primary.verifyhost; data->set.proxy_ssl.primary.verifyhost;
} }
break; break;
#endif #endif
case CURLOPT_SSL_VERIFYSTATUS: case CURLOPT_SSL_VERIFYSTATUS:
/* /*
skipping to change at line 2405 skipping to change at line 2394
result = Curl_setstropt(&data->set.str[STRING_MAIL_AUTH], result = Curl_setstropt(&data->set.str[STRING_MAIL_AUTH],
va_arg(param, char *)); va_arg(param, char *));
break; break;
case CURLOPT_MAIL_RCPT: case CURLOPT_MAIL_RCPT:
/* Set the list of mail recipients */ /* Set the list of mail recipients */
data->set.mail_rcpt = va_arg(param, struct curl_slist *); data->set.mail_rcpt = va_arg(param, struct curl_slist *);
break; break;
#endif #endif
case CURLOPT_SASL_AUTHZID:
/* Authorisation identity (identity to act as) */
result = Curl_setstropt(&data->set.str[STRING_SASL_AUTHZID],
va_arg(param, char *));
break;
case CURLOPT_SASL_IR: case CURLOPT_SASL_IR:
/* Enable/disable SASL initial response */ /* Enable/disable SASL initial response */
data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE; data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE;
break; break;
#ifndef CURL_DISABLE_RTSP #ifndef CURL_DISABLE_RTSP
case CURLOPT_RTSP_REQUEST: case CURLOPT_RTSP_REQUEST:
{ {
/* /*
* Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...)
* Would this be better if the RTSPREQ_* were just moved into here? * Would this be better if the RTSPREQ_* were just moved into here?
 End of changes. 4 change blocks. 
21 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)