servo/components/net
Martin Robinson bce7622cde
Switch to rustls and webpki-roots (#30025)
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).

Generally speaking the design of the network stack is the same. Changes:

- Code around certificate overrides needed to be refactored to work with
  rustls so the various thread-safe list of certificates is refactored
  into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
  so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
  the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
  used that includes parsed Certificates (or the default which reads
  them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
  due to the fact that the certificates need to be overriden explicitly
  now. This is due to the fact that the `webpki` crate is more stringent
  with self-signed certificates than SSL (CA certificates cannot used as
  end-entity certificates). [2]

1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114

Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
2023-08-08 14:00:10 +00:00
..
fetch Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
tests Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
Cargo.toml Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
connector.rs Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
cookie.rs Upgrade Hyper 2022-01-16 09:34:17 -08:00
cookie_storage.rs Upgrade Hyper 2022-01-16 09:34:17 -08:00
data_loader.rs Fix #2909 as far as WPT is concerned, not full data-url class integration 2019-11-26 09:49:30 -05:00
decoder.rs Upgrade Hyper 2022-01-16 09:34:17 -08:00
filemanager_thread.rs Upgrade Hyper 2022-01-16 09:34:17 -08:00
hosts.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
hsts.rs Remove customised implementation of hsts headers. (#30046) 2023-07-31 08:53:53 +00:00
http_cache.rs Upgrade Hyper 2022-01-16 09:34:17 -08:00
http_loader.rs Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
image_cache.rs Try to use WebRender types more 2023-07-10 17:35:50 +02:00
lib.rs Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
mime_classifier.rs Further changes required by Servo 2023-05-19 19:05:24 +02:00
resource_thread.rs Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
storage_thread.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
subresource_integrity.rs bump base64 from 0.10 to 0.21 (#29804) 2023-08-02 21:25:37 +00:00
websocket_loader.rs Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00