@@ -142,7 +142,13 @@ static char *cached_accept_language;
142
142
143
143
static char * http_ssl_backend ;
144
144
145
- static int http_schannel_check_revoke = 1 ;
145
+ static int http_schannel_check_revoke_mode =
146
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
147
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
148
+ #else
149
+ CURLSSLOPT_NO_REVOKE ;
150
+ #endif
151
+
146
152
/*
147
153
* With the backend being set to `schannel`, setting sslCAinfo would override
148
154
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -417,7 +423,19 @@ static int http_options(const char *var, const char *value,
417
423
}
418
424
419
425
if (!strcmp ("http.schannelcheckrevoke" , var )) {
420
- http_schannel_check_revoke = git_config_bool (var , value );
426
+ if (value && !strcmp (value , "best-effort" )) {
427
+ http_schannel_check_revoke_mode =
428
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
429
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
430
+ #else
431
+ CURLSSLOPT_NO_REVOKE ;
432
+ warning (_ ("%s=%s unsupported by current cURL" ),
433
+ var , value );
434
+ #endif
435
+ } else
436
+ http_schannel_check_revoke_mode =
437
+ (git_config_bool (var , value ) ?
438
+ 0 : CURLSSLOPT_NO_REVOKE );
421
439
return 0 ;
422
440
}
423
441
@@ -1044,8 +1062,8 @@ static CURL *get_curl_handle(void)
1044
1062
#endif
1045
1063
1046
1064
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
1047
- ! http_schannel_check_revoke ) {
1048
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
1065
+ http_schannel_check_revoke_mode ) {
1066
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
1049
1067
}
1050
1068
1051
1069
if (http_proactive_auth != PROACTIVE_AUTH_NONE )
0 commit comments