@@ -158,7 +158,13 @@ static char *cached_accept_language;
158
158
159
159
static char * http_ssl_backend ;
160
160
161
- static int http_schannel_check_revoke = 1 ;
161
+ static int http_schannel_check_revoke_mode =
162
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
163
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
164
+ #else
165
+ CURLSSLOPT_NO_REVOKE ;
166
+ #endif
167
+
162
168
/*
163
169
* With the backend being set to `schannel`, setting sslCAinfo would override
164
170
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -323,7 +329,19 @@ static int http_options(const char *var, const char *value, void *cb)
323
329
}
324
330
325
331
if (!strcmp ("http.schannelcheckrevoke" , var )) {
326
- http_schannel_check_revoke = git_config_bool (var , value );
332
+ if (value && !strcmp (value , "best-effort" )) {
333
+ http_schannel_check_revoke_mode =
334
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
335
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
336
+ #else
337
+ CURLSSLOPT_NO_REVOKE ;
338
+ warning (_ ("%s=%s unsupported by current cURL" ),
339
+ var , value );
340
+ #endif
341
+ } else
342
+ http_schannel_check_revoke_mode =
343
+ (git_config_bool (var , value ) ?
344
+ 0 : CURLSSLOPT_NO_REVOKE );
327
345
return 0 ;
328
346
}
329
347
@@ -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
#if LIBCURL_VERSION_NUM >= 0x072c00
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