Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ALPN and signature algorithms to OpenSSL config #24976

Merged
merged 1 commit into from Dec 10, 2019

Conversation

@Darkspirit
Copy link
Contributor

Darkspirit commented Nov 30, 2019

  • Updated http crate from 0.1.17 to 0.1.20.
  • Updated hyper from 0.12.33 to 0.12.35.
  • Updated hyper-openssl from 0.7.0 to 0.7.1.
  • Updated openssl crate from 0.10.11 to 0.10.26.
    • Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
    • Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS#1 1.5).
      Thereby we disabled the following non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. SHA1/RSA is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
    • Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and Rustls. Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
      Compared to Mozilla intermediate v5 we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
    • Switched server-side to Mozilla intermediate v5 in components/net/tests/main.rs. (The new modern would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
    • Renamed ssl_connector_builder(certs) to the more neutral and long-term better fitting create_tls_config(certs, alpn) as it was done in #24764.

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
@highfive
Copy link

highfive commented Nov 30, 2019

Heads up! This PR modifies the following files:

  • @KiChjang: components/net/resource_thread.rs, components/net/http_loader.rs, components/net/websocket_loader.rs, components/net/connector.rs, components/net/tests/main.rs and 1 more
@Darkspirit Darkspirit force-pushed the Darkspirit:openssl branch from b823720 to b811be7 Nov 30, 2019
@Darkspirit
Copy link
Contributor Author

Darkspirit commented Dec 2, 2019

Historical context: Last cipherlist change was in #22243 (comment).
TLS 1.0 + 1.1 have been disabled in Servo and Firefox Nightly in the meantime.
Plain RSA is finally down to 1.07% (No. 61: AES128-SHA) and 0.64% (No. 63: AES256-SHA). Most sloppy end-user websites have upgraded their configurations.

@asajeffrey
Copy link
Member

asajeffrey commented Dec 2, 2019

@avadacatavra do you have opinions about ciphersuites?

Copy link
Contributor

avadacatavra left a comment

This is great work--thank you!

@jdm
Copy link
Member

jdm commented Dec 9, 2019

@bors-servo r=avadacatavra

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

📌 Commit b811be7 has been approved by avadacatavra

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

Testing commit b811be7 with merge 7facf5f...

bors-servo added a commit that referenced this pull request Dec 9, 2019
Add ALPN and signature algorithms to OpenSSL config

* Updated http crate from 0.1.17 [to 0.1.20](https://github.com/hyperium/http/blob/master/CHANGELOG.md#0120-november-26-2019).
* Updated hyper from 0.12.33 [to 0.12.35](hyperium/hyper@v0.12.33...v0.12.35).
* Updated hyper-openssl from 0.7.0 [to 0.7.1](https://github.com/sfackler/hyper-openssl/blob/master/CHANGELOG.md#v071---2019-03-01).
* Updated openssl crate from 0.10.11 [to 0.10.26](https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md#v01026---2019-11-22).
  * Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
  * Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA certificates, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS 1.5).
Thereby we disabled the [following](https://www.ssllabs.com/ssltest/viewClient.html?name=OpenSSL&version=1.1.1c&key=165) non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. [SHA1/RSA](https://tools.ietf.org/html/draft-ietf-tls-md5-sha1-deprecate-00) is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
  * Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and [Rustls](https://github.com/ctz/rustls/blob/4b13a322c05c9310173513782c5d12c5afedfaf5/rustls/src/suites.rs#L377). Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
Compared to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
  * Switched server-side to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) in components/net/tests/main.rs. (The new `modern` would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
  * Renamed `ssl_connector_builder(certs)` to the more neutral and long-term better fitting `create_tls_config(certs, alpn)` as it was done in #24764.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Dec 9, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

Testing commit b811be7 with merge 4bee751...

bors-servo added a commit that referenced this pull request Dec 9, 2019
Add ALPN and signature algorithms to OpenSSL config

* Updated http crate from 0.1.17 [to 0.1.20](https://github.com/hyperium/http/blob/master/CHANGELOG.md#0120-november-26-2019).
* Updated hyper from 0.12.33 [to 0.12.35](hyperium/hyper@v0.12.33...v0.12.35).
* Updated hyper-openssl from 0.7.0 [to 0.7.1](https://github.com/sfackler/hyper-openssl/blob/master/CHANGELOG.md#v071---2019-03-01).
* Updated openssl crate from 0.10.11 [to 0.10.26](https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md#v01026---2019-11-22).
  * Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
  * Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA certificates, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS 1.5).
Thereby we disabled the [following](https://www.ssllabs.com/ssltest/viewClient.html?name=OpenSSL&version=1.1.1c&key=165) non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. [SHA1/RSA](https://tools.ietf.org/html/draft-ietf-tls-md5-sha1-deprecate-00) is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
  * Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and [Rustls](https://github.com/ctz/rustls/blob/4b13a322c05c9310173513782c5d12c5afedfaf5/rustls/src/suites.rs#L377). Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
Compared to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
  * Switched server-side to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) in components/net/tests/main.rs. (The new `modern` would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
  * Renamed `ssl_connector_builder(certs)` to the more neutral and long-term better fitting `create_tls_config(certs, alpn)` as it was done in #24764.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Dec 9, 2019

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

Testing commit b811be7 with merge 56f4046...

bors-servo added a commit that referenced this pull request Dec 9, 2019
Add ALPN and signature algorithms to OpenSSL config

* Updated http crate from 0.1.17 [to 0.1.20](https://github.com/hyperium/http/blob/master/CHANGELOG.md#0120-november-26-2019).
* Updated hyper from 0.12.33 [to 0.12.35](hyperium/hyper@v0.12.33...v0.12.35).
* Updated hyper-openssl from 0.7.0 [to 0.7.1](https://github.com/sfackler/hyper-openssl/blob/master/CHANGELOG.md#v071---2019-03-01).
* Updated openssl crate from 0.10.11 [to 0.10.26](https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md#v01026---2019-11-22).
  * Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
  * Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA certificates, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS 1.5).
Thereby we disabled the [following](https://www.ssllabs.com/ssltest/viewClient.html?name=OpenSSL&version=1.1.1c&key=165) non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. [SHA1/RSA](https://tools.ietf.org/html/draft-ietf-tls-md5-sha1-deprecate-00) is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
  * Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and [Rustls](https://github.com/ctz/rustls/blob/4b13a322c05c9310173513782c5d12c5afedfaf5/rustls/src/suites.rs#L377). Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
Compared to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
  * Switched server-side to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) in components/net/tests/main.rs. (The new `modern` would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
  * Renamed `ssl_connector_builder(certs)` to the more neutral and long-term better fitting `create_tls_config(certs, alpn)` as it was done in #24764.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Dec 9, 2019

@bors-servo retry

bors-servo added a commit that referenced this pull request Dec 10, 2019
Add ALPN and signature algorithms to OpenSSL config

* Updated http crate from 0.1.17 [to 0.1.20](https://github.com/hyperium/http/blob/master/CHANGELOG.md#0120-november-26-2019).
* Updated hyper from 0.12.33 [to 0.12.35](hyperium/hyper@v0.12.33...v0.12.35).
* Updated hyper-openssl from 0.7.0 [to 0.7.1](https://github.com/sfackler/hyper-openssl/blob/master/CHANGELOG.md#v071---2019-03-01).
* Updated openssl crate from 0.10.11 [to 0.10.26](https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md#v01026---2019-11-22).
  * Set ALPN to h2+http/1.1 for https (Enabled HTTP2) and http/1.1 for websockets.
  * Restricted signature algorithms to the same list across platforms: EdDSA at first, then ECDSA certificates, then TLS 1.3's RSA(-PSS), then classic RSA (PKCS 1.5).
Thereby we disabled the [following](https://www.ssllabs.com/ssltest/viewClient.html?name=OpenSSL&version=1.1.1c&key=165) non-web-standard signature algorithms: SHA512/ECDSA, SHA224/ECDSA, SHA1/ECDSA, SHA224/RSA, SHA224/DSA, SHA1/DSA, SHA256/DSA, SHA384/DSA, SHA512/DSA. [SHA1/RSA](https://tools.ietf.org/html/draft-ietf-tls-md5-sha1-deprecate-00) is almost dead and now only used by a few old and broken F5 load balancers: Like TLS 1.0 deprecation, we can again deprecate this some months earlier than other browsers.
  * Added Chacha20 to TLS 1.2 ciphersuite list and preferred it like Firefox and [Rustls](https://github.com/ctz/rustls/blob/4b13a322c05c9310173513782c5d12c5afedfaf5/rustls/src/suites.rs#L377). Removed legacy and privacy-hostile plain RSA (AES256-SHA, AES128-SHA).
Compared to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) we keep ECDHE-RSA-AES256-SHA and ECDHE-RSA-AES128-SHA for now, but won't reintroduce deprecated DHE.
  * Switched server-side to [Mozilla intermediate v5](https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29) in components/net/tests/main.rs. (The new `modern` would have been TLSv1.3-only, therefore only worked with OpenSSL 1.1.1 which is unfortunately not yet used on every target.)
  * Renamed `ssl_connector_builder(certs)` to the more neutral and long-term better fitting `create_tls_config(certs, alpn)` as it was done in #24764.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
@bors-servo
Copy link
Contributor

bors-servo commented Dec 10, 2019

Testing commit b811be7 with merge 1974c87...

@bors-servo
Copy link
Contributor

bors-servo commented Dec 10, 2019

☀️ Test successful - status-taskcluster
Approved by: avadacatavra
Pushing 1974c87 to master...

@bors-servo bors-servo merged commit b811be7 into servo:master Dec 10, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@Darkspirit Darkspirit deleted the Darkspirit:openssl branch Dec 10, 2019
This was referenced Dec 13, 2019
bors-servo added a commit that referenced this pull request Dec 13, 2019
Disable H2 ALPN.

This was introduced by #24976, and it breaks loading https://google.com. Without any network specialists currently contributing to Servo regularly, I would rather revert the particular change that broke it rather than attempt to continue investigating.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25286
- [x] These changes do not require tests because no H2 testing, no HTTPS configuration testing.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this pull request Dec 13, 2019
Disable H2 ALPN.

This was introduced by #24976, and it breaks loading https://google.com. Without any network specialists currently contributing to Servo regularly, I would rather revert the particular change that broke it rather than attempt to continue investigating.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25286
- [x] These changes do not require tests because no H2 testing, no HTTPS configuration testing.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.