If a complete chain can be built and validated this function returns 1, otherwise it return zero, in exceptional circumstances it can also return a negative code.
If the function fails additional error information can be obtained by examining ctx using, for example X509_STORE_CTX_get_error().