@@ -147,7 +147,13 @@ static char *cached_accept_language;
147
147
148
148
static char * http_ssl_backend ;
149
149
150
- static int http_schannel_check_revoke = 1 ;
150
+ static int http_schannel_check_revoke_mode =
151
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
152
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
153
+ #else
154
+ CURLSSLOPT_NO_REVOKE ;
155
+ #endif
156
+
151
157
/*
152
158
* With the backend being set to `schannel`, setting sslCAinfo would override
153
159
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -422,7 +428,19 @@ static int http_options(const char *var, const char *value,
422
428
}
423
429
424
430
if (!strcmp ("http.schannelcheckrevoke" , var )) {
425
- http_schannel_check_revoke = git_config_bool (var , value );
431
+ if (value && !strcmp (value , "best-effort" )) {
432
+ http_schannel_check_revoke_mode =
433
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
434
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
435
+ #else
436
+ CURLSSLOPT_NO_REVOKE ;
437
+ warning (_ ("%s=%s unsupported by current cURL" ),
438
+ var , value );
439
+ #endif
440
+ } else
441
+ http_schannel_check_revoke_mode =
442
+ (git_config_bool (var , value ) ?
443
+ 0 : CURLSSLOPT_NO_REVOKE );
426
444
return 0 ;
427
445
}
428
446
@@ -1056,8 +1074,8 @@ static CURL *get_curl_handle(void)
1056
1074
#endif
1057
1075
1058
1076
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
1059
- ! http_schannel_check_revoke ) {
1060
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
1077
+ http_schannel_check_revoke_mode ) {
1078
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
1061
1079
}
1062
1080
1063
1081
if (http_proactive_auth != PROACTIVE_AUTH_NONE )
0 commit comments