@@ -168,7 +168,13 @@ static char *cached_accept_language;
168
168
169
169
static char * http_ssl_backend ;
170
170
171
- static int http_schannel_check_revoke = 1 ;
171
+ static int http_schannel_check_revoke_mode =
172
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
173
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
174
+ #else
175
+ CURLSSLOPT_NO_REVOKE ;
176
+ #endif
177
+
172
178
/*
173
179
* With the backend being set to `schannel`, setting sslCAinfo would override
174
180
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -383,7 +389,19 @@ static int http_options(const char *var, const char *value, void *cb)
383
389
}
384
390
385
391
if (!strcmp ("http.schannelcheckrevoke" , var )) {
386
- http_schannel_check_revoke = git_config_bool (var , value );
392
+ if (value && !strcmp (value , "best-effort" )) {
393
+ http_schannel_check_revoke_mode =
394
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
395
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
396
+ #else
397
+ CURLSSLOPT_NO_REVOKE ;
398
+ warning (_ ("%s=%s unsupported by current cURL" ),
399
+ var , value );
400
+ #endif
401
+ } else
402
+ http_schannel_check_revoke_mode =
403
+ (git_config_bool (var , value ) ?
404
+ 0 : CURLSSLOPT_NO_REVOKE );
387
405
return 0 ;
388
406
}
389
407
@@ -961,9 +979,9 @@ static CURL *get_curl_handle(void)
961
979
#endif
962
980
963
981
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
964
- ! http_schannel_check_revoke ) {
982
+ http_schannel_check_revoke_mode ) {
965
983
#if LIBCURL_VERSION_NUM >= 0x072c00
966
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
984
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
967
985
#else
968
986
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
969
987
#endif
0 commit comments