@@ -156,6 +156,8 @@ static int http_schannel_check_revoke_mode =
156156 */
157157static int http_schannel_use_ssl_cainfo ;
158158
159+ static int http_auto_client_cert ;
160+
159161static int always_auth_proactively (void )
160162{
161163 return http_proactive_auth != PROACTIVE_AUTH_NONE &&
@@ -444,6 +446,11 @@ static int http_options(const char *var, const char *value,
444446 return 0 ;
445447 }
446448
449+ if (!strcmp ("http.sslautoclientcert" , var )) {
450+ http_auto_client_cert = git_config_bool (var , value );
451+ return 0 ;
452+ }
453+
447454 if (!strcmp ("http.minsessions" , var )) {
448455 min_curl_sessions = git_config_int (var , value , ctx -> kvi );
449456 if (min_curl_sessions > 1 )
@@ -1061,9 +1068,20 @@ static CURL *get_curl_handle(void)
10611068 }
10621069#endif
10631070
1064- if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
1065- http_schannel_check_revoke_mode ) {
1066- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
1071+ if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend )) {
1072+ long ssl_options = 0 ;
1073+ if (http_schannel_check_revoke_mode ) {
1074+ ssl_options |= http_schannel_check_revoke_mode ;
1075+ }
1076+
1077+ if (http_auto_client_cert ) {
1078+ #ifdef GIT_CURL_HAVE_CURLSSLOPT_AUTO_CLIENT_CERT
1079+ ssl_options |= CURLSSLOPT_AUTO_CLIENT_CERT ;
1080+ #endif
1081+ }
1082+
1083+ if (ssl_options )
1084+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , ssl_options );
10671085 }
10681086
10691087 if (http_proactive_auth != PROACTIVE_AUTH_NONE )
0 commit comments