alg comparison now correctly returns 0 when one hash is NULL

This commit is contained in:
Karel Miko 2026-04-16 23:08:43 +02:00
parent 5fa0683bd8
commit 6ed2864bc3

View file

@ -71,6 +71,8 @@ static LTC_INLINE int s_signature_algorithms_equal(const ltc_x509_signature_algo
else if (a->u.hash != NULL && b->u.hash != NULL) {
if (XSTRCMP(a->u.hash, b->u.hash) != 0)
return 0;
} else if (a->u.hash != b->u.hash) {
return 0;
}
return 1;
}