Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: more detail for test config verify exception
Recently CI started failing the real world verification suite on Android. The root cause was the vendored Let's Encrypt end entity certificate expiring. Figuring this out was hard for two main reasons: 1. CI was eating the Android logs we needed to see the error message. This has since been fixed. 2. The Android verifier was surfacing the expiration as an unknown issuer error with a generic "Chain validation failed" message. This branch attempts to fix item 2 by surfacing a more relevant error message. Unfortunately doing so is a little bit annoying. The `checkServerTrusted` call throws an exception with ~3 layers of wrapping before you get at the `CertificateExpiredException` that's the root cause. Since non-test configurations should never have an expired exception thrown at this stage (recall we check this explicitly earlier in processing), we gate the more complicated excepting "digging" based on `BuildConfig.TEST`. This should be a good balance of: * not changing existing behaviour, or introducing complexity for normal validation * surfacing a better error message when test certificates expire and start to break CI.
- Loading branch information