Remove asserts from asid_validate_path_internal()
authortb <tb@openbsd.org>
Fri, 24 Dec 2021 02:28:52 +0000 (02:28 +0000)
committertb <tb@openbsd.org>
Fri, 24 Dec 2021 02:28:52 +0000 (02:28 +0000)
commit4e76aadef3a75470a5b4a20e7f47fd5e2fbf261f
treed2f2bab9bf7f6c2b5faa4502b8484ed693bd1c61
parent920304fa6a24b5094b74afa29d3e6eefa753fb55
Remove asserts from asid_validate_path_internal()

The first asserts ensure that things checked in the callers hold true.
Turn them into error checks and set the error on the X509_STORE_CTX
if it's present. Checking sk_value(..., i) with i < sk_num(...) isn't
useful, particularly if that check is done via an assert. Turn one
remaining assert into a NULL check. Finally, simplify the sk_num()
checks in the callers.

ok jsing
lib/libcrypto/x509/x509_asid.c