@@ -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
@@ -403,7 +409,19 @@ static int http_options(const char *var, const char *value, void *cb)
403
409
}
404
410
405
411
if (!strcmp ("http.schannelcheckrevoke" , var )) {
406
- http_schannel_check_revoke = git_config_bool (var , value );
412
+ if (value && !strcmp (value , "best-effort" )) {
413
+ http_schannel_check_revoke_mode =
414
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
415
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
416
+ #else
417
+ CURLSSLOPT_NO_REVOKE ;
418
+ warning (_ ("%s=%s unsupported by current cURL" ),
419
+ var , value );
420
+ #endif
421
+ } else
422
+ http_schannel_check_revoke_mode =
423
+ (git_config_bool (var , value ) ?
424
+ 0 : CURLSSLOPT_NO_REVOKE );
407
425
return 0 ;
408
426
}
409
427
@@ -987,9 +1005,9 @@ static CURL *get_curl_handle(void)
987
1005
#endif
988
1006
989
1007
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
990
- ! http_schannel_check_revoke ) {
1008
+ http_schannel_check_revoke_mode ) {
991
1009
#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE
992
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
1010
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
993
1011
#else
994
1012
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
995
1013
#endif
0 commit comments