@@ -136,7 +136,13 @@ static char *cached_accept_language;
136
136
137
137
static char * http_ssl_backend ;
138
138
139
- static int http_schannel_check_revoke = 1 ;
139
+ static int http_schannel_check_revoke_mode =
140
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
141
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
142
+ #else
143
+ CURLSSLOPT_NO_REVOKE ;
144
+ #endif
145
+
140
146
/*
141
147
* With the backend being set to `schannel`, setting sslCAinfo would override
142
148
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -285,7 +291,19 @@ static int http_options(const char *var, const char *value, void *cb)
285
291
}
286
292
287
293
if (!strcmp ("http.schannelcheckrevoke" , var )) {
288
- http_schannel_check_revoke = git_config_bool (var , value );
294
+ if (value && !strcmp (value , "best-effort" )) {
295
+ http_schannel_check_revoke_mode =
296
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
297
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
298
+ #else
299
+ CURLSSLOPT_NO_REVOKE ;
300
+ warning (_ ("%s=%s unsupported by current cURL" ),
301
+ var , value );
302
+ #endif
303
+ } else
304
+ http_schannel_check_revoke_mode =
305
+ (git_config_bool (var , value ) ?
306
+ 0 : CURLSSLOPT_NO_REVOKE );
289
307
return 0 ;
290
308
}
291
309
@@ -869,9 +887,9 @@ static CURL *get_curl_handle(void)
869
887
#endif
870
888
871
889
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
872
- ! http_schannel_check_revoke ) {
890
+ http_schannel_check_revoke_mode ) {
873
891
#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE
874
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
892
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
875
893
#else
876
894
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
877
895
#endif
0 commit comments