Repository navigation
Make SSL tests work - #15784
Make SSL tests work#15784
Conversation
|
Heads up! This PR modifies the following files:
|
|
This addresses the issue tracked in #6919. |
|
Whoops, I only meant to include the last commit in this branch. Anyways, ignore the others. |
|
Firefox has a pref that mimics the behaviour of /etc/hosts so from the point of view of the networking code the domain and certificate match [1] and uses certutil to actually install the certificates into the local certificate database [2]. [1] https://dxr.mozilla.org/mozilla-central/source/testing/web-platform/harness/wptrunner/browsers/firefox.py#139 |
|
☔ The latest upstream changes (presumably #15771) made this pull request unmergeable. Please resolve the merge conflicts. |
nox
left a comment
There was a problem hiding this comment.
Commits "Update mozilla/ WPT results." and "Update results for remaining https tests in WPT." need to be squashed with "Only replace hosts when making TCP connections, not when verifying SSL certificates."
And you would please the old man I am if you would shorten that last commit title I had trouble pasting.
| None => resources_dir_path() | ||
| .expect("Need certificate file to make network requests") | ||
| .join(certificate_file), | ||
| }; |
There was a problem hiding this comment.
Wait, so the argument is ignored if there is a certificate_path? Please either pass the certificate_path option to the function in callers, or remove the argument altogether; it feels weird that the option takes precedence over the argument.
|
|
||
| fn connect(&self, host: &str, port: u16, scheme: &str) -> Result<Self::Stream, HttpError> { | ||
| self.connector.connect(&replace_host(host), port, scheme) | ||
| self.connector.connect(host, port, scheme) |
There was a problem hiding this comment.
This implementation exists only to do that replace_host call, now that it is gone you can pass &self.connector again to HyperRequest::with_connector in NetworkHttpRequestFactory::create and remove this impl altogether.
Hah, you killed the whole wrapper in next commit, nice!
| // since things like image fetches are classified differently by devtools | ||
| let is_xhr = request.destination == Destination::None; | ||
| let wrapped_response = obtain_response(&factory, &url, &request.method, | ||
| let wrapped_response = obtain_response(context.connector.clone(), &url, &request.method, |
There was a problem hiding this comment.
AFAIK this clone is pointless, and you can pass &Pool<Connector> to obtain_response.
There was a problem hiding this comment.
That was what I tried originally, and Rust's type checker became so confused that I didn't want to try to debug it. Please don't make me investigate it; it ends up trying to use the closure connector feature instead and it's not worth it.
|
Reviewed 1 of 3 files at r1. Comments from Reviewable |
|
wptrunner changes look fine; please remember to upstream them. |
|
@bors-servo: r=nox,jgraham |
|
📌 Commit ca2cc00 has been approved by |
Make SSL tests work These changes fix #6919. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15784) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt1 |
|
@bors-servo: r=nox,jgraham |
|
📌 Commit 6f590a8 has been approved by |
Make SSL tests work These changes fix #6919. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15784) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev |
These changes fix #6919.
This change is