@@ -141,7 +141,13 @@ static char *cached_accept_language;
141
141
142
142
static char * http_ssl_backend ;
143
143
144
- static int http_schannel_check_revoke = 1 ;
144
+ static int http_schannel_check_revoke_mode =
145
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
146
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
147
+ #else
148
+ CURLSSLOPT_NO_REVOKE ;
149
+ #endif
150
+
145
151
/*
146
152
* With the backend being set to `schannel`, setting sslCAinfo would override
147
153
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -405,7 +411,19 @@ static int http_options(const char *var, const char *value,
405
411
}
406
412
407
413
if (!strcmp ("http.schannelcheckrevoke" , var )) {
408
- http_schannel_check_revoke = git_config_bool (var , value );
414
+ if (value && !strcmp (value , "best-effort" )) {
415
+ http_schannel_check_revoke_mode =
416
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
417
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
418
+ #else
419
+ CURLSSLOPT_NO_REVOKE ;
420
+ warning (_ ("%s=%s unsupported by current cURL" ),
421
+ var , value );
422
+ #endif
423
+ } else
424
+ http_schannel_check_revoke_mode =
425
+ (git_config_bool (var , value ) ?
426
+ 0 : CURLSSLOPT_NO_REVOKE );
409
427
return 0 ;
410
428
}
411
429
@@ -992,9 +1010,9 @@ static CURL *get_curl_handle(void)
992
1010
#endif
993
1011
994
1012
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
995
- ! http_schannel_check_revoke ) {
1013
+ http_schannel_check_revoke_mode ) {
996
1014
#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE
997
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
1015
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
998
1016
#else
999
1017
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
1000
1018
#endif
0 commit comments