@@ -137,7 +137,13 @@ static char *cached_accept_language;
137
137
138
138
static char * http_ssl_backend ;
139
139
140
- static int http_schannel_check_revoke = 1 ;
140
+ static int http_schannel_check_revoke_mode =
141
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
142
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
143
+ #else
144
+ CURLSSLOPT_NO_REVOKE ;
145
+ #endif
146
+
141
147
/*
142
148
* With the backend being set to `schannel`, setting sslCAinfo would override
143
149
* the Certificate Store in cURL v7.60.0 and later, which is not what we want
@@ -395,7 +401,19 @@ static int http_options(const char *var, const char *value, void *cb)
395
401
}
396
402
397
403
if (!strcmp ("http.schannelcheckrevoke" , var )) {
398
- http_schannel_check_revoke = git_config_bool (var , value );
404
+ if (value && !strcmp (value , "best-effort" )) {
405
+ http_schannel_check_revoke_mode =
406
+ #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT
407
+ CURLSSLOPT_REVOKE_BEST_EFFORT ;
408
+ #else
409
+ CURLSSLOPT_NO_REVOKE ;
410
+ warning (_ ("%s=%s unsupported by current cURL" ),
411
+ var , value );
412
+ #endif
413
+ } else
414
+ http_schannel_check_revoke_mode =
415
+ (git_config_bool (var , value ) ?
416
+ 0 : CURLSSLOPT_NO_REVOKE );
399
417
return 0 ;
400
418
}
401
419
@@ -979,9 +997,9 @@ static CURL *get_curl_handle(void)
979
997
#endif
980
998
981
999
if (http_ssl_backend && !strcmp ("schannel" , http_ssl_backend ) &&
982
- ! http_schannel_check_revoke ) {
1000
+ http_schannel_check_revoke_mode ) {
983
1001
#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE
984
- curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , CURLSSLOPT_NO_REVOKE );
1002
+ curl_easy_setopt (result , CURLOPT_SSL_OPTIONS , http_schannel_check_revoke_mode );
985
1003
#else
986
1004
warning (_ ("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0" ));
987
1005
#endif
0 commit comments