Skip to content

Commit e7338b3

Browse files
Branan Rileydonoghuc
authored andcommitted
(maint) Force full cert chain in curl when validating CRLs
1 parent 58128fe commit e7338b3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

curl/src/client.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,17 @@ namespace leatherman { namespace curl {
450450
}
451451

452452
curl_easy_setopt_maybe(ctx, CURLOPT_CRLFILE, _client_crl.c_str());
453+
454+
#ifdef CURLSSLOPT_NO_PARTIALCHAIN
455+
// Curl 7.68 has a bug where it defaults to passing
456+
// X509_V_FLAG_PARTIAL_CHAIN to openssl. This breaks CRL
457+
// chains, since the crl logic passes
458+
// X509_V_FLAG_CRL_CHECK_ALL, which requires a full chain.
459+
//
460+
// We disable partial chains explicitly here to work around
461+
// this.
462+
curl_easy_setopt_maybe(ctx, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_PARTIALCHAIN);
463+
#endif
453464
}
454465

455466
void client::set_proxy_info(context &ctx) {

0 commit comments

Comments
 (0)