Skip to content

Commit

Permalink
Switch to rustls and webpki-roots
Browse files Browse the repository at this point in the history
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. briansmith/webpki#114

Fixes web-platform-tests#7888.
Fixes web-platform-tests#13749.
Fixes web-platform-tests#26835.
Fixes web-platform-tests#29291.
  • Loading branch information
mrobinson authored and Servo WPT Sync committed Aug 8, 2023
1 parent 0f0227f commit 8e2e34a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/wptrunner/wptrunner/executors/executorservo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def build_servo_command(test, test_url_func, browser, binary, pause_after_test,
extra_args=None, debug_opts="replace-surrogates"):
args = [
"--hard-fail", "-u", "Servo/wptrunner",
"--ignore-certificate-errors",
"-z", test_url_func(test),
]
if debug_opts:
Expand Down

0 comments on commit 8e2e34a

Please sign in to comment.