[crypto] Add x509_is_self_signed() helper function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-02-15 12:43:51 +00:00
parent 3e721e0c08
commit 943d75b557
3 changed files with 15 additions and 1 deletions

View File

@@ -595,7 +595,7 @@ static void validator_step ( struct validator *validator ) {
* nothing more to do.
*/
last = x509_last ( validator->chain );
if ( asn1_compare ( &last->issuer.raw, &last->subject.raw ) == 0 ) {
if ( x509_is_self_signed ( last ) ) {
validator_finished ( validator, rc );
return;
}