@@ -158,7 +158,13 @@ static char *cached_accept_language;
158158
159159static char * http_ssl_backend ;
160160
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+
162168/*
163169 * With the backend being set to `schannel`, setting sslCAinfo would override
164170 * 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)
323329 }
324330
325331 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 );
327345 return 0 ;
328346 }
329347
@@ -869,9 +887,9 @@ static CURL *get_curl_handle(void)
869887#endif
870888
871889 if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
872- ! http_schannel_check_revoke ) {
890+ http_schannel_check_revoke_mode ) {
873891#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 );
875893#else
876894 warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
877895#endif
0 commit comments