X.509 certificates that are missing the BasicConstraints extension are still regarded as CA certificates, if the KeyUsage extension allows Cert Signing.
The BasicConstraints extension must be present and the cA flag set according to RFC 5280, 6.1.4 (k)
https://github.com/libressl/openbsd/blob/libressl-v4.2.0/src/lib/libcrypto/x509/x509_purp.c#L593
(Also, the documentation comment does not seem to completely match the function output. Return value 2 does not exist, 5 is undocumented.)
X.509 certificates that are missing the BasicConstraints extension are still regarded as CA certificates, if the KeyUsage extension allows Cert Signing.
The BasicConstraints extension must be present and the cA flag set according to RFC 5280, 6.1.4 (k)
https://github.com/libressl/openbsd/blob/libressl-v4.2.0/src/lib/libcrypto/x509/x509_purp.c#L593
(Also, the documentation comment does not seem to completely match the function output. Return value 2 does not exist, 5 is undocumented.)