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