@@ -165,7 +165,13 @@ static char *cached_accept_language;
165165
166166static char * http_ssl_backend ;
167167
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+
169175/*
170176 * With the backend being set to `schannel`, setting sslCAinfo would override
171177 * 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)
330336 }
331337
332338 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 );
334352 return 0 ;
335353 }
336354
@@ -905,9 +923,9 @@ static CURL *get_curl_handle(void)
905923#endif
906924
907925 if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
908- ! http_schannel_check_revoke ) {
926+ http_schannel_check_revoke_mode ) {
909927#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 );
911929#else
912930 warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
913931#endif
0 commit comments