commit 10aace0d2083a452222a31dfaddfbf15984d8d41
parent ada6891e8fc6f821e0724268c23e00e01f39b36e
Author: Drew DeVault <sir@cmpwn.com>
Date: Thu, 4 Mar 2021 12:58:50 -0500
Discard CA certs unless there's no other
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/tofu.c b/src/tofu.c
@@ -63,6 +63,9 @@ xt_end_cert(const br_x509_class **ctx)
cc->err = err;
return;
}
+ if (br_x509_decoder_isCA(&cc->decoder) && cc->pkey) {
+ return;
+ }
cc->pkey = br_x509_decoder_get_pkey(&cc->decoder);
br_sha512_out(&cc->sha512, &cc->hash);
}