@@ -165,7 +165,13 @@ static char *cached_accept_language;
165
165
166
166
static char * http_ssl_backend ;
167
167
168
- static int http_schannel_check_revoke = 1 ;
168
+ static int http_schannel_check_revoke_mode =
169
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
170
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
171
+ #else
172
+ CURLSSLOPT_NO_REVOKE ;
173
+ #endif
174
+
169
175
/*
170
176
* With the backend being set to `schannel`, setting sslCAinfo would override
171
177
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -330,7 +336,19 @@ static int http_options(const char *var, const char *value, void *cb)
330
336
}
331
337
332
338
if (!strcmp ("http.schannelcheckrevoke" , var )) {
333
- http_schannel_check_revoke = git_config_bool (var , value );
339
+ if (value && !strcmp (value , "best-effort" )) {
340
+ http_schannel_check_revoke_mode =
341
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
342
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
343
+ #else
344
+ CURLSSLOPT_NO_REVOKE ;
345
+ warning (_ ("%s=%s unsupported by current cURL" ),
346
+ var , value );
347
+ #endif
348
+ } else
349
+ http_schannel_check_revoke_mode =
350
+ (git_config_bool (var , value ) ?
351
+ 0 : CURLSSLOPT_NO_REVOKE );
334
352
return 0 ;
335
353
}
336
354
@@ -905,9 +923,9 @@ static CURL *get_curl_handle(void)
905
923
#endif
906
924
907
925
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
908
- ! http_schannel_check_revoke ) {
926
+ http_schannel_check_revoke_mode ) {
909
927
#if LIBCURL_VERSION_NUM >= 0x072c00
910
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
928
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
911
929
#else
912
930
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
913
931
#endif
0 commit comments