Remove asserts from addr_validate_path_internal()
authortb <tb@openbsd.org>
Fri, 24 Dec 2021 02:02:37 +0000 (02:02 +0000)
committertb <tb@openbsd.org>
Fri, 24 Dec 2021 02:02:37 +0000 (02:02 +0000)
commitee334350dde09def9cb8adf3d300751c3cfc77c8
tree3c108aaad40659ec337baaa88179d7f36f580d6c
parentaa99f8fe96644abcfeb2c3ee7d049a2186a4aa09
Remove asserts from addr_validate_path_internal()

This is reachable from x509_verify(), but all asserts are previously
checked in the caller. Turn them into error checks and make sure
the error is set on the X509_STORE_CTX if present. Change some
stack == NULL || sk_num(stack) == 0 checks into sk_num(stack) <= 0
which is equivalent but simpler.

ok jsing
lib/libcrypto/x509/x509_addr.c