@@ -148,6 +148,8 @@ static int http_schannel_check_revoke_mode =
148
148
*/
149
149
static int http_schannel_use_ssl_cainfo ;
150
150
151
+ static int http_auto_client_cert ;
152
+
151
153
size_t fread_buffer (char * ptr , size_t eltsize , size_t nmemb , void * buffer_ )
152
154
{
153
155
size_t size = eltsize * nmemb ;
@@ -312,6 +314,11 @@ static int http_options(const char *var, const char *value, void *cb)
312
314
return 0 ;
313
315
}
314
316
317
+ if (!strcmp ("http.sslautoclientcert" , var )) {
318
+ http_auto_client_cert = git_config_bool (var , value );
319
+ return 0 ;
320
+ }
321
+
315
322
if (!strcmp ("http.minsessions" , var )) {
316
323
min_curl_sessions = git_config_int (var , value );
317
324
if (min_curl_sessions > 1 )
@@ -822,13 +829,24 @@ static CURL *get_curl_handle(void)
822
829
}
823
830
#endif
824
831
825
- if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
826
- http_schannel_check_revoke_mode ) {
832
+ if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend )) {
833
+ long ssl_options = 0 ;
834
+ if (http_schannel_check_revoke_mode ) {
827
835
#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE
828
- curl_easy_setopt ( result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode ) ;
836
+ ssl_options |= http_schannel_check_revoke_mode ;
829
837
#else
830
- warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
838
+ warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
831
839
#endif
840
+ }
841
+
842
+ if (http_auto_client_cert ) {
843
+ #ifdef GIT_CURL_HAVE_CURLSSLOPT_AUTO_CLIENT_CERT
844
+ ssl_options |= CURLSSLOPT_AUTO_CLIENT_CERT ;
845
+ #endif
846
+ }
847
+
848
+ if (ssl_options )
849
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , ssl_options );
832
850
}
833
851
834
852
if (http_proactive_auth )
0 commit comments