@@ -157,6 +157,8 @@ static int http_schannel_check_revoke_mode =
157
157
*/
158
158
static int http_schannel_use_ssl_cainfo ;
159
159
160
+ static int http_auto_client_cert ;
161
+
160
162
static int always_auth_proactively (void )
161
163
{
162
164
return http_proactive_auth != PROACTIVE_AUTH_NONE &&
@@ -445,6 +447,11 @@ static int http_options(const char *var, const char *value,
445
447
return 0 ;
446
448
}
447
449
450
+ if (!strcmp ("http.sslautoclientcert" , var )) {
451
+ http_auto_client_cert = git_config_bool (var , value );
452
+ return 0 ;
453
+ }
454
+
448
455
if (!strcmp ("http.minsessions" , var )) {
449
456
min_curl_sessions = git_config_int (var , value , ctx -> kvi );
450
457
if (min_curl_sessions > 1 )
@@ -1061,9 +1068,20 @@ static CURL *get_curl_handle(void)
1061
1068
}
1062
1069
#endif
1063
1070
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 );
1067
1085
}
1068
1086
1069
1087
if (http_proactive_auth != PROACTIVE_AUTH_NONE )
0 commit comments