@@ -157,6 +157,8 @@ static int http_schannel_check_revoke_mode =
157157 */
158158static int http_schannel_use_ssl_cainfo ;
159159
160+ static int http_auto_client_cert ;
161+
160162static int always_auth_proactively (void )
161163{
162164 return http_proactive_auth != PROACTIVE_AUTH_NONE &&
@@ -445,6 +447,11 @@ static int http_options(const char *var, const char *value,
445447 return 0 ;
446448 }
447449
450+ if (!strcmp ("http.sslautoclientcert" , var )) {
451+ http_auto_client_cert = git_config_bool (var , value );
452+ return 0 ;
453+ }
454+
448455 if (!strcmp ("http.minsessions" , var )) {
449456 min_curl_sessions = git_config_int (var , value , ctx -> kvi );
450457 if (min_curl_sessions > 1 )
@@ -1062,9 +1069,20 @@ static CURL *get_curl_handle(void)
10621069 }
10631070#endif
10641071
1065- if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
1066- http_schannel_check_revoke_mode ) {
1067- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
1072+ if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend )) {
1073+ long ssl_options = 0 ;
1074+ if (http_schannel_check_revoke_mode ) {
1075+ ssl_options |= http_schannel_check_revoke_mode ;
1076+ }
1077+
1078+ if (http_auto_client_cert ) {
1079+ #ifdef GIT_CURL_HAVE_CURLSSLOPT_AUTO_CLIENT_CERT
1080+ ssl_options |= CURLSSLOPT_AUTO_CLIENT_CERT ;
1081+ #endif
1082+ }
1083+
1084+ if (ssl_options )
1085+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , ssl_options );
10681086 }
10691087
10701088 if (http_proactive_auth != PROACTIVE_AUTH_NONE )
0 commit comments