Rework ownership handling in x509_constraints_validate()
authortb <tb@openbsd.org>
Mon, 14 Mar 2022 21:15:49 +0000 (21:15 +0000)
committertb <tb@openbsd.org>
Mon, 14 Mar 2022 21:15:49 +0000 (21:15 +0000)
commita7f2167b9666a92d0ae8ad6930786d18d2ce8cc7
tree51d15a0725d7f66f5f926a45bcd86ad2f055d2a0
parent0d287521741fa7e733a668fd516255e2e6025b3d
Rework ownership handling in x509_constraints_validate()

Instead of having the caller allocate and pass in a new
x509_constraints_name struct, handle allocation inside
x509_constraints_validate(). Also make the error optional.
All this is done to simplify the call sites and to make it
more obvious that there are no leaks.

ok jsing
lib/libcrypto/x509/x509_alt.c
lib/libcrypto/x509/x509_constraints.c
lib/libcrypto/x509/x509_internal.h