4 ms·
That can still happen without proper pinning, or if the local browser downgrades the request back to HTTP. What? What kind of browser would downgrade the reque
by icebraining 9y ago
That can still happen without proper pinning, or if the local browser downgrades the request back to HTTP.
What? What kind of browser would downgrade the request to HTTP?
Unfortunately this isn't particularly uncommon with corporate/school proxy, in-flight wi-fi services that forge certificates
Which require a cert signed by a CA already in the client's machine.
Regarding your specific example about loading Javascript referenced in an HTML document's <script> tag, the solution is to validate the data, not the server. The valid server can still send incorrect data. If you include hashes about a page's subresources[4], the browser can validate the integrity of the file it received.
If you don't have HTTPS, how can you be sure that the SRI hash wasn't tampered with?
- pdkl95 9y ago> What kind of browser would downgrade the request to HTTP? Sorry, that should be the browser's local environment, not just the browser itself. An obvious example is sslstrip: https://moxie.org/software/sslstrip/ https://moxie.org/software/sslstrip/ > Which require a cert signed by a CA already in the client's machine. Of course. That happens. > If you don't have HTTPS, how can you be sure that the SRI hash wasn't tampered with? Loading static resources from other domains is very common. Especially ad networks.
- icebraining 9y agoSorry, that should be the browser's local environment, not just the browser itself. An obvious example is sslstrip Right. Which would still work if all HTTP connections were replaced by HTTPS with self-signed certs, as you proposed. sslstrip, which must have MITM control to do that downgrade, would just terminate the connection and re-encrypt it with its own cert. Which is why PKI HTTPS everywhere is the reasonable solution. Of course. That happens. Right. Nothing can protect you if you deliberately undermine it. Loading static resources from other domains is very common. Especially ad networks. Right, and SRI is certainly useful, but you still need PKI HTTPS on every site to bootstrap it. And since the only reason to avoid HTTPS is to avoid the encryption penalty, automatically generated self-signed certificates wouldn't be used anyway.