Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-remove unnecesary stat calls from by_dir.c
After examining consumer test code and discussion with davidben, the stat here serves only to get out of this code without having an error on the error stack when the file does not exist, which is then interpreted as the CA or CRL does not exist. Instead, we simply attempt to open the files, and if it does not work for any reason, clear the error that was set. This changes us to treat any failure in finding a CA or CRL using the by directory lookup as if the file was just not present. This ensures a consistent behaviour with the error returned from the verification code. We don't differentiate between the file not existing or other errors such as garbage in the file. Fixed: 708 Change-Id: I1eee01282cde803fb7c9b52003da3dfbd5ba9e33 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/66967 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> (cherry picked from commit fae0964b3d44e94ca2a2d21f86e61dabe683d130)
- Loading branch information