1
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-05-19 16:36:02 +02:00

Discard CA certs unless there's no other

This commit is contained in:
Drew DeVault 2021-03-04 12:58:50 -05:00
parent ada6891e8f
commit 10aace0d20

View File

@ -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);
}