| Summary: | [Curl] WKCertificateInfoGetVerificationError function doesn't return an error code when the browser accesses https://wrong.host.badssl.com | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Takashi Komori <takashi.komori> | ||||
| Component: | Platform | Assignee: | Takashi Komori <takashi.komori> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | Basuke.Suzuki, chris.reid, darin, don.olmstead, ews-watchlist, galpeter, Hironori.Fujii, ross.kirsling, stephan.szabo, takashi.komori, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Takashi Komori
2020-03-09 06:40:19 PDT
Created attachment 393025 [details]
Fix the return code WKCertificateInfoGetVerificationError function returns.
(In reply to Takashi Komori from comment #1) > Created attachment 393025 [details] > Fix the return code WKCertificateInfoGetVerificationError function returns. This patch fixes the bug by checking the result of the result of validation on curl layer using curl_easy_getinfo. Unfortunately we couldn't make tests for this change. We think tests for the patch should be added to API tests (TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp), but the reproduction of this bug is difficult in API tests because it only occurs accessing sites which have wrong certs. We added some code which shows return code of WKCertificateInfoGetVerificationError function on Server Trust Evaluation Request Dialog. For now, checking non-zero return code on the dialog is the only way to check the patch is working. If there is some good way to test the patch, please teach us. We could and probably should configure some erroneous certificates locally in the web server we use to run tests. Not sure the whole range of options we have to map DNS all to that single server with different certificates; I think it makes sense for WebKit testing to include that and it’s worth some effort. (In reply to Darin Adler from comment #3) > We could and probably should configure some erroneous certificates locally > in the web server we use to run tests. Not sure the whole range of options > we have to map DNS all to that single server with different certificates; I > think it makes sense for WebKit testing to include that and it’s worth some > effort. We will try to find how to test bad certs. Thank you for your comment. Pull request: https://github.com/WebKit/WebKit/pull/6618 Committed 256827@main (58dd451692d4): <https://commits.webkit.org/256827@main> Reviewed commits have been landed. Closing PR #6618 and removing active labels. |