diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ac78cce..28c9fd30a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,30 @@ pairing + the legacy GCM path, security-review #5/#9) are enabled only by an exp the old flag is still accepted as explicit-off). - Windows was already opt-in (unchecked installer task) and is unchanged. +### TLS moved to aws-lc-rs, with post-quantum key exchange (⚠ build-visible for packagers/embedders) + +The rustls backend across the whole workspace — host, tray, clients and `punktfunk-core` — is now +**aws-lc-rs** instead of `ring`, which enables rustls's `prefer-post-quantum`: every TLS 1.3 +handshake (management API, the native `punktfunk/1` control plane, QUIC) now offers the +**X25519MLKEM768** hybrid key exchange first. Ring has no ML-KEM, which is why the backend had to +move. This is negotiation-only and additive — the classical curves stay in the list, so any client +that does not implement ML-KEM connects exactly as before, and no wire format, ABI or pairing +record changes. The session AEAD (AES-128-GCM / ChaCha20-Poly1305) is a separate mechanism and is +untouched. + +⚠ **Building from source now needs a working C compiler**, because `aws-lc-sys` compiles AWS-LC. +No CMake, Go, or NASM is required for the default (non-FIPS) build — on Windows x86_64 rustls turns +on `aws-lc-rs/prebuilt-nasm`, so no NASM has to be installed. If you add a crate that depends on +`aws-lc-rs` *directly*, name `features = ["prebuilt-nasm"]` on it: a package selection that pulls +`aws-lc-rs` without also enabling rustls's `aws_lc_rs` feature otherwise fails on Windows. + +`ring` is still compiled in, because `ureq 2` pins `rustls/ring` inside its own dependency +declaration and cargo features are additive. Two backends present means rustls will not infer one, +so anything constructing a config through `ClientConfig::builder()` panics unless a provider was +installed first. **Embedders of `punktfunk-core` that build their own rustls configs should call +`punktfunk_core::tls::install_default_provider()` at startup**, or use `builder_with_provider`. +Every first-party binary already does. + ### The ENet control port now exists only while a pairing does (rust-safety WP0) `rusty_enet` — a c2rust-style transpile of C ENet, and the host's only pre-auth-reachable unsafe diff --git a/Cargo.lock b/Cargo.lock index 87209508b..b927c22ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler2" @@ -384,6 +384,30 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "aws-lc-rs" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + [[package]] name = "axum" version = "0.8.9" @@ -1137,6 +1161,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "either" version = "1.16.0" @@ -1414,6 +1444,12 @@ dependencies = [ "tokio", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.32" @@ -3221,8 +3257,8 @@ name = "pf-update-check" version = "0.27.0" dependencies = [ "anyhow", + "aws-lc-rs", "base64", - "ring", "serde", "serde_json", "ureq", @@ -3646,6 +3682,7 @@ dependencies = [ "anyhow", "ash", "ashpd", + "aws-lc-rs", "axum", "axum-server", "base64", @@ -3685,7 +3722,6 @@ dependencies = [ "rand 0.8.6", "rcgen", "reis", - "ring", "roxmltree", "rsa", "rusqlite", @@ -3808,6 +3844,7 @@ version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e" dependencies = [ + "aws-lc-rs", "bytes", "fastbloom", "getrandom 0.3.4", @@ -3990,8 +4027,8 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" dependencies = [ + "aws-lc-rs", "pem", - "ring", "rustls-pki-types", "time", "yasna", @@ -4111,7 +4148,7 @@ dependencies = [ "cfg-if", "getrandom 0.2.17", "libc", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -4218,6 +4255,7 @@ version = "0.23.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -4282,9 +4320,10 @@ version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -5301,6 +5340,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt index fd6c69fd2..6c18054b9 100644 --- a/THIRD-PARTY-NOTICES.txt +++ b/THIRD-PARTY-NOTICES.txt @@ -7,7 +7,7 @@ below. Each is distributed under its own permissive license; the full license te follow the manifest. This file is generated by scripts/gen-third-party-notices.py (or `cargo about`, see about.toml) — do not edit by hand. -Total third-party crates: 596 +Total third-party crates: 601 ---------------------------------------------------------------------------- VENDORED THIRD-PARTY SOURCE (inside first-party crates) @@ -19,6 +19,9 @@ VENDORED THIRD-PARTY SOURCE (inside first-party crates) Font Awesome Free brand icons (vendored, assets/os-icons) — https://fontawesome.com Simple Icons (vendored, assets/os-icons) — https://simpleicons.org Bazzite logo (vendored, assets/os-icons) — https://github.com/ublue-os/bazzite + Font Awesome Free brand icons (vendored, assets/launcher-icons) — https://fontawesome.com + Simple Icons (vendored, assets/launcher-icons) — https://simpleicons.org + Playnite logo (vendored, assets/launcher-icons) — https://github.com/JosefNemec/Playnite ---------------------------------------------------------------------------- MANIFEST (crate version — SPDX license — source) @@ -59,6 +62,8 @@ MANIFEST (crate version — SPDX license — source) atomig-macro 0.4.0 — MIT/Apache-2.0 — https://github.com/LukasKalbertodt/atomig/ audiopus_sys 0.2.2 — ISC — https://github.com/lakelezz/audiopus_sys.git autocfg 1.5.1 — Apache-2.0 OR MIT — https://github.com/cuviper/autocfg + aws-lc-rs 1.18.0 — ISC AND (Apache-2.0 OR ISC) — https://github.com/aws/aws-lc-rs + aws-lc-sys 0.44.0 — ISC AND (Apache-2.0 OR ISC) AND Apache-2.0 AND MIT AND BSD-3-Clause AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR ISC OR MIT-0) — https://github.com/aws/aws-lc-rs axum 0.8.9 — MIT — https://github.com/tokio-rs/axum axum-core 0.5.6 — MIT — https://github.com/tokio-rs/axum axum-server 0.8.0 — MIT — https://github.com/programatik29/axum-server @@ -132,6 +137,7 @@ MANIFEST (crate version — SPDX license — source) digest 0.10.7 — MIT OR Apache-2.0 — https://github.com/RustCrypto/traits displaydoc 0.2.6 — MIT OR Apache-2.0 — https://github.com/yaahc/displaydoc downcast-rs 1.2.1 — MIT/Apache-2.0 — https://github.com/marcianx/downcast-rs + dunce 1.0.5 — CC0-1.0 OR MIT-0 OR Apache-2.0 — https://gitlab.com/kornelski/dunce either 1.16.0 — MIT OR Apache-2.0 — https://github.com/rayon-rs/either endi 1.1.1 — MIT — https://github.com/zeenix/endi enumflags2 0.7.12 — MIT OR Apache-2.0 — https://github.com/meithecatte/enumflags2 @@ -162,6 +168,7 @@ MANIFEST (crate version — SPDX license — source) form_urlencoded 1.2.2 — MIT OR Apache-2.0 — https://github.com/servo/rust-url fragile 2.1.0 — Apache-2.0 — https://github.com/mitsuhiko/fragile fs-err 3.3.0 — MIT OR Apache-2.0 — https://github.com/andrewhickman/fs-err + fs_extra 1.3.0 — MIT — https://github.com/webdesus/fs_extra futures 0.3.32 — MIT OR Apache-2.0 — https://github.com/rust-lang/futures-rs futures-channel 0.3.32 — MIT OR Apache-2.0 — https://github.com/rust-lang/futures-rs futures-core 0.3.32 — MIT OR Apache-2.0 — https://github.com/rust-lang/futures-rs @@ -482,6 +489,7 @@ MANIFEST (crate version — SPDX license — source) unicode-segmentation 1.13.3 — MIT OR Apache-2.0 — https://github.com/unicode-rs/unicode-segmentation unicode-width 0.2.2 — MIT OR Apache-2.0 — https://github.com/unicode-rs/unicode-width universal-hash 0.5.1 — MIT OR Apache-2.0 — https://github.com/RustCrypto/traits + untrusted 0.7.1 — ISC — https://github.com/briansmith/untrusted untrusted 0.9.0 — ISC — https://github.com/briansmith/untrusted ureq 2.12.1 — MIT OR Apache-2.0 — https://github.com/algesten/ureq url 2.5.8 — MIT OR Apache-2.0 — https://github.com/servo/rust-url @@ -3088,6 +3096,534 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------------- +The following license (LICENSE) applies to: aws-lc-rs 1.18.0 +---------------------------------------------------------------------------- +SPDX-License-Identifier: ISC AND (Apache-2.0 OR ISC) + + +Apache 2.0 license +------------------------------------- + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + +ISC license +------------------------------------- + + +Copyright Amazon.com, Inc. or its affiliates. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------------------------------------------------------------------- +The following license (LICENSE) applies to: aws-lc-sys 0.44.0 +---------------------------------------------------------------------------- +AWS Libcrypto (AWS-LC) + +AWS-LC is a fork of BoringSSL, which is itself a fork of OpenSSL. +Content from these and other sources retains their original licensing, +as described below. New files from AWS-LC are made available under the Apache-2.0 license OR the ISC +license. These licenses are reproduced at the bottom of this file. + +``` +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +SPDX-License-Identifier: Apache-2.0 OR ISC +``` + + +================================================================================ +BoringSSL +================================================================================ + +BoringSSL is a Google-maintained fork of OpenSSL. Historically, code +authored by Google for BoringSSL was licensed under the ISC License. +BoringSSL has since relicensed upstream to Apache License 2.0. Existing +AWS-LC code originating from BoringSSL retains its ISC license, while +newer code taken from BoringSSL is licensed under Apache License 2.0. + +``` +Copyright (c) 2014-2024 Google Inc. +SPDX-License-Identifier: ISC +``` + +Additional individual contributions to BoringSSL-derived code are +covered under the ISC license: + + - Brian Smith (Copyright 2016) + - Robert Nagy (Copyright 2022) + - Arm Ltd (Copyright 2020) + +``` +Copyright (c) 2025-2026 Google Inc. +SPDX-License-Identifier: Apache-2.0 +``` + +================================================================================ +OpenSSL +================================================================================ + +Code derived from the OpenSSL project is licensed under the +Apache License, Version 2.0. + +``` +Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. +SPDX-License-Identifier: Apache-2.0 +``` + +Some OpenSSL-derived files also carry the original SSLeay copyright: + +``` +Copyright (c) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved. +SPDX-License-Identifier: Apache-2.0 +``` + +Portions of OpenSSL-derived code include contributions from: + + - Sun Microsystems, Inc. (Copyright 2002) + - Nokia (Copyright 2005) + - Intel Corporation (Copyright 2012-2021) + +These contributions are covered under the Apache-2.0 license. + +================================================================================ +mlkem-native +================================================================================ + +Code from the mlkem-native project is licensed under Apache License 2.0 or MIT or ISC. + +``` +Copyright (c) The mlkem-native project authors. +SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT +``` + +================================================================================ +mldsa-native +================================================================================ + +Code from the mldsa-native project is licensed under Apache License 2.0 or MIT or ISC + +``` +Copyright (c) The mldsa-native project authors. +SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT +``` + +================================================================================ +Third-Party Libraries (compiled into libcrypto/libssl) +================================================================================ + +Fiat Cryptography +----------------- +Synthesizing Correct-by-Construction Code for Cryptographic Primitives. +See third_party/fiat/LICENSE. + +``` +Copyright (c) 2015-2020 the fiat-crypto authors. +SPDX-License-Identifier: MIT +``` + +s2n-bignum +---------- +Integer arithmetic routines for cryptography. +See third_party/s2n-bignum/s2n-bignum-imported/LICENSE. + +``` +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0 +``` + +Note: ML-KEM/SHA3 code within s2n-bignum is licensed as +Apache-2.0 OR ISC OR MIT (with attribution), sourced from the +mlkem-native project. + +Jitter Entropy RNG +------------------- +CPU Jitter Random Number Generator Library. +See third_party/jitterentropy/jitterentropy-library/LICENSE. + +The Jitter Entropy library is dual-licensed under a BSD-style license +and the GNU General Public License Version 2. Amazon expressly elects +to distribute the package under the 3-Clause BSD License and NOT under +GNU General Public License Version 2. + +``` +Copyright (C) 2017 - 2025, Stephan Mueller . +SPDX-License-Identifier: BSD-3-Clause +``` + +Keccak / AES Reference Implementations +--------------------------------------- +Public domain (CC0) contributions. +https://creativecommons.org/public-domain/cc0 + +Code from sources and by authors listed in comments on top of the respective files. + + +================================================================================ +Third-Party Libraries (NOT compiled into libcrypto/libssl) +================================================================================ + +The following are used for testing and build tooling only. Distributing +code linked against AWS-LC (libcrypto/libssl) does NOT trigger these +license obligations. + +Google Test +----------- +See third_party/googletest/LICENSE. + +``` +Copyright 2008 Google Inc. +SPDX-License-Identifier: BSD-3-Clause +``` + +Go Standard Library +------------------- +Code in ssl/test/runner/ is derived from the Go standard library. + +``` +Copyright (c) The Go Authors. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause +``` + +Wycheproof Test Vectors +------------------------ +Project Wycheproof is a community managed repository of test vectors that can be used by cryptography library +developers to test against known attacks, specification inconsistencies, and other various implementation bugs. + +See third_party/wycheproof_testvectors/LICENSE. + +``` +SPDX-License-Identifier: Apache-2.0 +``` + + +================================================================================ +Full License Texts +================================================================================ + +Apache License 2.0 +------------------ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +ISC License +----------- +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +MIT License +----------- +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +BSD 3-Clause License +-------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +MIT No Attribution (MIT-0) +-------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ---------------------------------------------------------------------------- The following license (LICENSE) applies to: axum 0.8.9 ---------------------------------------------------------------------------- @@ -5597,6 +6133,132 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------------- +The following license (LICENSE) applies to: dunce 1.0.5, to_method 1.1.0 +---------------------------------------------------------------------------- +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. + + ---------------------------------------------------------------------------- The following license (LICENSE-MIT) applies to: either 1.16.0, itertools 0.10.5, itertools 0.13.0 ---------------------------------------------------------------------------- @@ -6424,6 +7086,28 @@ the following restrictions: 3. This notice may not be removed or altered from any source distribution. +---------------------------------------------------------------------------- +The following license (font-awesome-brands.txt) applies to: Font Awesome Free brand icons (vendored, assets/launcher-icons) +---------------------------------------------------------------------------- +Font Awesome Free — brand icons (steam, xbox in assets/launcher-icons/) are from +Font Awesome Free. + +Copyright (c) Fonticons, Inc. (https://fontawesome.com) + +Font Awesome Free icons are licensed under the Creative Commons Attribution 4.0 +International license (CC BY 4.0), https://creativecommons.org/licenses/by/4.0/. +The icons are redistributed here as monochrome SVG path data with no +modifications beyond color normalization (fill="currentColor"). + +Per the Font Awesome Free license (https://fontawesome.com/license/free): +"Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Attribution is required by MIT, SIL OFL, and CC BY licenses." + +Brand icons are trademarks of their respective owners and are used for +identification purposes only; their use does not imply endorsement. + + ---------------------------------------------------------------------------- The following license (font-awesome-brands.txt) applies to: Font Awesome Free brand icons (vendored, assets/os-icons) ---------------------------------------------------------------------------- @@ -6476,6 +7160,32 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------------- +The following license (LICENSE) applies to: fs_extra 1.3.0 +---------------------------------------------------------------------------- +MIT License + +Copyright (c) 2017 Denis Kurilenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ---------------------------------------------------------------------------- The following license (LICENSE-APACHE) applies to: futures 0.3.32, futures-channel 0.3.32, futures-core 0.3.32, futures-executor 0.3.32, futures-io 0.3.32, futures-macro 0.3.32, futures-sink 0.3.32, futures-task 0.3.32, futures-util 0.3.32 ---------------------------------------------------------------------------- @@ -10437,6 +11147,40 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------------- +The following license (playnite.txt) applies to: Playnite logo (vendored, assets/launcher-icons) +---------------------------------------------------------------------------- +Playnite — the `playnite` mark in assets/launcher-icons/ is the Playnite logo from the +Playnite source repository (media/playnite-logo-black.svg). + +Copyright (c) 2020 Josef Nemec (https://github.com/JosefNemec/Playnite) + +Licensed under the MIT License: + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in the + Software without restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Modifications: the colour was normalized to fill="currentColor"; the original viewBox +(0 0 1024 1024) and path geometry are unchanged. + +Brand icons are trademarks of their respective owners and are used for identification +purposes only; their use does not imply endorsement. + + ---------------------------------------------------------------------------- The following license (LICENSE-MIT) applies to: png 0.18.1 ---------------------------------------------------------------------------- @@ -13205,6 +13949,24 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------------- +The following license (simple-icons.txt) applies to: Simple Icons (vendored, assets/launcher-icons) +---------------------------------------------------------------------------- +Simple Icons — brand icons (lutris, heroic, epic, gog in assets/launcher-icons/) are +from Simple Icons +(https://simpleicons.org, https://github.com/simple-icons/simple-icons). + +Upstream slugs: lutris, heroicgameslauncher, epicgames, gogdotcom. + +The Simple Icons SVG path data is released under CC0 1.0 Universal (public domain +dedication), https://creativecommons.org/publicdomain/zero/1.0/ — no attribution +required; this notice is provided for provenance. + +Brand icons are trademarks of their respective owners and are used for +identification purposes only; their use does not imply endorsement. See +https://github.com/simple-icons/simple-icons/blob/develop/DISCLAIMER.md. + + ---------------------------------------------------------------------------- The following license (simple-icons.txt) applies to: Simple Icons (vendored, assets/os-icons) ---------------------------------------------------------------------------- @@ -13907,132 +14669,6 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. ----------------------------------------------------------------------------- -The following license (LICENSE) applies to: to_method 1.1.0 ----------------------------------------------------------------------------- -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. - - ---------------------------------------------------------------------------- The following license (LICENSE) applies to: tokio 1.52.3, tokio-util 0.7.18 ---------------------------------------------------------------------------- @@ -14837,7 +15473,7 @@ DEALINGS IN THE SOFTWARE. ---------------------------------------------------------------------------- -The following license (LICENSE.txt) applies to: untrusted 0.9.0 +The following license (LICENSE.txt) applies to: untrusted 0.7.1, untrusted 0.9.0 ---------------------------------------------------------------------------- // Copyright 2015-2016 Brian Smith. // diff --git a/clients/android/native/Cargo.toml b/clients/android/native/Cargo.toml index 1755e47d9..74facf006 100644 --- a/clients/android/native/Cargo.toml +++ b/clients/android/native/Cargo.toml @@ -15,7 +15,8 @@ crate-type = ["cdylib"] [dependencies] # The whole protocol/transport/FEC/crypto + the embeddable NativeClient connector. `quic` pulls -# the punktfunk/1 control plane (now ring-only — no aws-lc, see punktfunk-core/Cargo.toml). +# the punktfunk/1 control plane, whose TLS runs on aws-lc-rs (see punktfunk-core/Cargo.toml) — +# aws-lc-sys cross-compiles for all three ABIs with the NDK clang cargo-ndk already exports. punktfunk-core = { path = "../../../crates/punktfunk-core", features = ["quic"] } jni = "0.21" log = "0.4" diff --git a/clients/cli/src/main.rs b/clients/cli/src/main.rs index b0920fea3..8b198fe45 100644 --- a/clients/cli/src/main.rs +++ b/clients/cli/src/main.rs @@ -1389,6 +1389,7 @@ from the config directory for a true factory reset." #[cfg(any(target_os = "linux", windows))] fn main() -> std::process::ExitCode { + punktfunk_core::tls::install_default_provider(); // Logs to stderr; stdout is the machine interface (TSV/JSON), exactly like the session // binary's contract. tracing_subscriber::fmt() diff --git a/clients/linux/src/main.rs b/clients/linux/src/main.rs index 39175a56a..7a90ff0ce 100644 --- a/clients/linux/src/main.rs +++ b/clients/linux/src/main.rs @@ -33,6 +33,7 @@ mod ui_trust; #[cfg(target_os = "linux")] fn main() -> gtk::glib::ExitCode { + punktfunk_core::tls::install_default_provider(); app::run() } diff --git a/clients/probe/Cargo.toml b/clients/probe/Cargo.toml index ca485037f..bd8b7a0e8 100644 --- a/clients/probe/Cargo.toml +++ b/clients/probe/Cargo.toml @@ -10,7 +10,14 @@ repository.workspace = true [dependencies] punktfunk-core = { path = "../../crates/punktfunk-core", features = ["quic"] } -quinn = "0.11" +# Backend features mirror punktfunk-core's quinn exactly (see its Cargo.toml). +quinn = { version = "0.11", default-features = false, features = [ + "log", + "platform-verifier", + "runtime-tokio", + "rustls-aws-lc-rs", + "bloom", +] } tokio = { version = "1", features = ["rt-multi-thread", "net", "time", "macros"] } anyhow = "1" tracing = "0.1" diff --git a/clients/windows/src/main.rs b/clients/windows/src/main.rs index 0daddd82e..3eb9d26ba 100644 --- a/clients/windows/src/main.rs +++ b/clients/windows/src/main.rs @@ -58,6 +58,7 @@ fn main() { let _ = AttachConsole(ATTACH_PARENT_PROCESS); } set_app_user_model_id(); + punktfunk_core::tls::install_default_provider(); // Everything logs to stderr AND `%LOCALAPPDATA%\punktfunk\logs\client.log` (see [`logfile`]): // a GUI/MSIX launch has no console, so without the file the client side of any field report diff --git a/crates/pf-client-core/Cargo.toml b/crates/pf-client-core/Cargo.toml index c09165ca6..f7dfe35ef 100644 --- a/crates/pf-client-core/Cargo.toml +++ b/crates/pf-client-core/Cargo.toml @@ -105,7 +105,9 @@ ureq = "2" # Signed update-manifest fetch/verify + the install-kind ladder, shared with the host so one # trust rule serves both (crates/pf-update-check). pf-update-check = { path = "../pf-update-check" } -rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] } +# aws-lc-rs backend + PQ hybrid key exchange, matching punktfunk-core (see its Cargo.toml for +# why every crate that names a rustls backend has to name the same one). +rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "prefer-post-quantum", "logging", "std", "tls12"] } serde = { version = "1", features = ["derive"] } serde_json = "1" anyhow = "1" diff --git a/crates/pf-client-core/src/library.rs b/crates/pf-client-core/src/library.rs index 74d28e43f..0be4fd120 100644 --- a/crates/pf-client-core/src/library.rs +++ b/crates/pf-client-core/src/library.rs @@ -171,9 +171,9 @@ pub fn agent( use rustls::pki_types::pem::PemObject; let bad = |what: &str, e: &dyn std::fmt::Display| LibraryError::Unreachable(format!("{what}: {e}")); - // The ring provider, explicitly — the same one core's QUIC endpoints install, so the + // The aws-lc-rs provider, explicitly — the same one core's QUIC endpoints install, so the // process never mixes rustls crypto providers. - let provider = Arc::new(rustls::crypto::ring::default_provider()); + let provider = Arc::new(rustls::crypto::aws_lc_rs::default_provider()); let builder = rustls::ClientConfig::builder_with_provider(provider) .with_safe_default_protocol_versions() .map_err(|e| bad("tls config", &e))? @@ -224,6 +224,10 @@ pub fn fetch_art(pinned: &ureq::Agent, base: &str, url: &str) -> Result, let resp = if url.starts_with(base) { pinned.get(url).call() } else { + // ureq's default agent builds its own rustls config, which panics unless a provider is + // already installed (two backends are compiled in — see `tls::install_default_provider`). + // Done here rather than trusting the binary, since this crate is linked by several. + punktfunk_core::tls::install_default_provider(); ureq::get(url).timeout(Duration::from_secs(10)).call() } .map_err(classify)?; diff --git a/crates/pf-clipboard/Cargo.toml b/crates/pf-clipboard/Cargo.toml index 8636866fa..60a1083c0 100644 --- a/crates/pf-clipboard/Cargo.toml +++ b/crates/pf-clipboard/Cargo.toml @@ -18,7 +18,15 @@ publish = false punktfunk-core = { path = "../punktfunk-core", features = ["quic"] } anyhow = "1" tracing = "0.1" -quinn = "0.11" +# Backend features mirror punktfunk-core's quinn exactly — quinn's default `rustls-ring` would +# drag a second crypto stack into every build that links this crate. +quinn = { version = "0.11", default-features = false, features = [ + "log", + "platform-verifier", + "runtime-tokio", + "rustls-aws-lc-rs", + "bloom", +] } tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "time", "macros"] } # CF_DIB <-> PNG conversion (winfmt) - most Windows apps paste bitmaps, not the "PNG" format. # Unconditional (not windows-gated) so winfmt's pure-conversion unit tests run on every host. diff --git a/crates/pf-update-check/Cargo.toml b/crates/pf-update-check/Cargo.toml index f011787b3..072f19e5e 100644 --- a/crates/pf-update-check/Cargo.toml +++ b/crates/pf-update-check/Cargo.toml @@ -22,9 +22,17 @@ publish = false anyhow = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" -# Ed25519 over the exact manifest bytes. The workspace is ring-only (no aws-lc-sys — it fails -# on the Windows CI runner), and this is the same primitive the plugin-store index uses. -ring = "0.17" +# Ed25519 over the exact manifest bytes — the same primitive the plugin-store index uses, on the +# workspace's one crypto backend. aws-lc-rs's API is ring-compatible, so the call sites are +# unchanged apart from the crate name. +# +# `prebuilt-nasm` is what lets aws-lc-sys build on Windows x86_64 without NASM installed. rustls +# enables it for its own dependents, but a build that selects THIS crate without one that turns on +# rustls's `aws_lc_rs` feature — `cargo test -p pf-update-check` is exactly that, since its only +# rustls comes from ureq's ring-flavoured dependency — would get no enabler and fail on the CI +# runner. Naming it here makes the crate build standalone instead of relying on who else is in +# the selection. +aws-lc-rs = { version = "1", features = ["prebuilt-nasm"] } base64 = "0.22" # Small, sync, bundles webpki roots — no system cert store dependency, which matters on the # Deck (Decky's embedded Python has no usable roots either; see clients/decky/main.py). diff --git a/crates/pf-update-check/src/sig.rs b/crates/pf-update-check/src/sig.rs index ce8a965d9..3ebc6f606 100644 --- a/crates/pf-update-check/src/sig.rs +++ b/crates/pf-update-check/src/sig.rs @@ -40,7 +40,8 @@ pub fn verify_signature(bytes: &[u8], sig_text: &str, keys: &[PublicKey]) -> Res .decode(sig_text.trim()) .context("signature file is not valid base64")?; for key in keys { - let pk = ring::signature::UnparsedPublicKey::new(&ring::signature::ED25519, &key.0); + let pk = + aws_lc_rs::signature::UnparsedPublicKey::new(&aws_lc_rs::signature::ED25519, &key.0); if pk.verify(bytes, &sig).is_ok() { return Ok(()); } @@ -52,14 +53,14 @@ pub fn verify_signature(bytes: &[u8], sig_text: &str, keys: &[PublicKey]) -> Res pub(crate) mod tests { use super::*; - /// A fresh ring keypair as `(pinned key string, signer)` — the format contract with the + /// A fresh keypair as `(pinned key string, signer)` — the format contract with the /// CI signers (raw 32-byte key, `ed25519:`; raw 64-byte signature, base64). - pub(crate) fn keypair() -> (String, ring::signature::Ed25519KeyPair) { + pub(crate) fn keypair() -> (String, aws_lc_rs::signature::Ed25519KeyPair) { + use aws_lc_rs::signature::KeyPair as _; use base64::Engine as _; - use ring::signature::KeyPair as _; - let rng = ring::rand::SystemRandom::new(); - let pkcs8 = ring::signature::Ed25519KeyPair::generate_pkcs8(&rng).unwrap(); - let kp = ring::signature::Ed25519KeyPair::from_pkcs8(pkcs8.as_ref()).unwrap(); + let rng = aws_lc_rs::rand::SystemRandom::new(); + let pkcs8 = aws_lc_rs::signature::Ed25519KeyPair::generate_pkcs8(&rng).unwrap(); + let kp = aws_lc_rs::signature::Ed25519KeyPair::from_pkcs8(pkcs8.as_ref()).unwrap(); let key_str = format!( "ed25519:{}", base64::engine::general_purpose::STANDARD.encode(kp.public_key().as_ref()) diff --git a/crates/punktfunk-core/Cargo.toml b/crates/punktfunk-core/Cargo.toml index 3714d5db8..58a4d10e5 100644 --- a/crates/punktfunk-core/Cargo.toml +++ b/crates/punktfunk-core/Cargo.toml @@ -52,13 +52,22 @@ zeroize = "1" # not just the default route. Tiny, cross-platform (getifaddrs / GetAdaptersAddresses), no cmake. if-addrs = "0.13" -quinn = { version = "0.11", optional = true } -rustls = { version = "0.23", optional = true, default-features = false, features = ["ring", "std"] } -# Crypto backend pinned to `ring` (matching rustls/quinn above) so the whole quic tree is -# ring-only: no aws-lc-rs/aws-lc-sys (heavy C dep, needs cmake) is pulled in. Keeps the -# Android/iOS cdylib lean and the cross-compile cmake-free. `generate_simple_self_signed` -# is backend-agnostic, so the swap is transparent. -rcgen = { version = "0.13", optional = true, default-features = false, features = ["ring", "pem"] } +# Crypto backend is aws-lc-rs, and rustls/quinn/rcgen must all name it: they each select a +# backend independently, so one dissenter pulls a SECOND crypto stack in via feature unification. +# `prefer-post-quantum` puts the X25519MLKEM768 hybrid key exchange first in the TLS 1.3 +# handshake, which is the reason the old `ring` pin is gone — ring has no ML-KEM. +# Windows needs no NASM: rustls's `aws_lc_rs` feature enables `aws-lc-rs/prebuilt-nasm`. +# quinn's feature list is its own default set with `rustls-ring` swapped out, nothing more. +quinn = { version = "0.11", optional = true, default-features = false, features = [ + "log", + "platform-verifier", + "runtime-tokio", + "rustls-aws-lc-rs", + "bloom", +] } +rustls = { version = "0.23", optional = true, default-features = false, features = ["aws_lc_rs", "prefer-post-quantum", "std"] } +# `generate_simple_self_signed` is backend-agnostic, so the swap is transparent here. +rcgen = { version = "0.13", optional = true, default-features = false, features = ["aws_lc_rs", "pem"] } rustls-pki-types = { version = "1", optional = true } sha2 = { version = "0.10", optional = true } hmac = { version = "0.12", optional = true } diff --git a/crates/punktfunk-core/src/quic/endpoint.rs b/crates/punktfunk-core/src/quic/endpoint.rs index 7fd2c4bd8..def498e43 100644 --- a/crates/punktfunk-core/src/quic/endpoint.rs +++ b/crates/punktfunk-core/src/quic/endpoint.rs @@ -176,7 +176,7 @@ fn server_from_der( addr: std::net::SocketAddr, idle: std::time::Duration, ) -> anyhow_result::Result { - let _ = rustls::crypto::ring::default_provider().install_default(); + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); // Client auth is OFFERED but optional: a client that presents its self-signed // identity is fingerprinted post-handshake (pairing / --require-pairing checks); // one that presents none still connects (and is rejected at the app layer when @@ -254,7 +254,7 @@ pub fn client_pinned_with_identity( ) -> PinnedClient { let observed = Arc::new(Mutex::new(None)); let ep = (|| { - let _ = rustls::crypto::ring::default_provider().install_default(); + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); let builder = rustls::ClientConfig::builder() .dangerous() .with_custom_certificate_verifier(Arc::new(crate::tls::PinVerify::with_observed( @@ -354,7 +354,7 @@ impl rustls::server::danger::ClientCertVerifier for AcceptAnyClientCert { message, cert, dss, - &rustls::crypto::ring::default_provider().signature_verification_algorithms, + &rustls::crypto::aws_lc_rs::default_provider().signature_verification_algorithms, ) } @@ -368,12 +368,12 @@ impl rustls::server::danger::ClientCertVerifier for AcceptAnyClientCert { message, cert, dss, - &rustls::crypto::ring::default_provider().signature_verification_algorithms, + &rustls::crypto::aws_lc_rs::default_provider().signature_verification_algorithms, ) } fn supported_verify_schemes(&self) -> Vec { - rustls::crypto::ring::default_provider() + rustls::crypto::aws_lc_rs::default_provider() .signature_verification_algorithms .supported_schemes() } diff --git a/crates/punktfunk-core/src/tls.rs b/crates/punktfunk-core/src/tls.rs index d3d29ac54..72c4edd10 100644 --- a/crates/punktfunk-core/src/tls.rs +++ b/crates/punktfunk-core/src/tls.rs @@ -8,6 +8,20 @@ use std::sync::{Arc, Mutex}; +/// Install aws-lc-rs as this process's rustls provider. Call once, early, from `main`. +/// +/// Two rustls backends are compiled in, and NOT by choice: ours is aws-lc-rs, but `ureq 2` names +/// `features = ["ring", ...]` in its own rustls dependency line, and cargo features are additive — +/// no dependent can switch that off. With both present rustls refuses to guess which one a config +/// meant, so anything built through `ClientConfig::builder()` (rather than +/// `builder_with_provider`) **panics** instead of picking one. ureq's default agent builds exactly +/// such a config on its first HTTPS request, so any binary that can reach one of those must have +/// called this first. Idempotent: losing the race to another installer is the expected outcome, +/// not an error, since every caller in this workspace installs the same provider. +pub fn install_default_provider() { + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); +} + /// SHA-256 of a certificate's DER encoding — the fingerprint clients pin. Re-exported as /// `crate::quic::endpoint::cert_fingerprint` for callers that already reach it there. pub fn cert_fingerprint(cert_der: &[u8]) -> [u8; 32] { @@ -91,7 +105,7 @@ impl rustls::client::danger::ServerCertVerifier for PinVerify { message, cert, dss, - &rustls::crypto::ring::default_provider().signature_verification_algorithms, + &rustls::crypto::aws_lc_rs::default_provider().signature_verification_algorithms, ) } @@ -105,12 +119,12 @@ impl rustls::client::danger::ServerCertVerifier for PinVerify { message, cert, dss, - &rustls::crypto::ring::default_provider().signature_verification_algorithms, + &rustls::crypto::aws_lc_rs::default_provider().signature_verification_algorithms, ) } fn supported_verify_schemes(&self) -> Vec { - rustls::crypto::ring::default_provider() + rustls::crypto::aws_lc_rs::default_provider() .signature_verification_algorithms .supported_schemes() } diff --git a/crates/punktfunk-host/Cargo.toml b/crates/punktfunk-host/Cargo.toml index 3fe611c06..fa6f51ce8 100644 --- a/crates/punktfunk-host/Cargo.toml +++ b/crates/punktfunk-host/Cargo.toml @@ -48,7 +48,15 @@ pf-vdisplay = { path = "../pf-vdisplay" } # compiles everywhere; the backends are cfg-gated inside it. pf-clipboard = { path = "../pf-clipboard" } # M3 native control plane (the `punktfunk/1` QUIC handshake; data plane stays native-thread UDP). -quinn = "0.11" +# Feature list = quinn's own defaults with `rustls-ring` swapped for `rustls-aws-lc-rs`; every +# crate selecting a rustls backend must agree or feature unification builds both (see core). +quinn = { version = "0.11", default-features = false, features = [ + "log", + "platform-verifier", + "runtime-tokio", + "rustls-aws-lc-rs", + "bloom", +] } anyhow = "1" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } @@ -86,20 +94,21 @@ base64 = "0.22" # webpki roots (no system cert dependency). Cross-platform so the fetch/parse code is compiled + # checked everywhere even though only the Windows GOG/Xbox providers need it today. ureq = "2" -rcgen = { version = "0.13", default-features = false, features = ["ring", "pem"] } +rcgen = { version = "0.13", default-features = false, features = ["aws_lc_rs", "pem"] } x509-parser = "0.16" # Only used for the plain-HTTP nvhttp listener (`bind().serve()`); HTTPS/mTLS is hand-rolled over # tokio-rustls (axum-server can't surface the peer cert), so we do NOT enable `tls-rustls` — that # feature is what pulled the unmaintained `rustls-pemfile` (security-review dep hygiene). axum-server = "0.8" -# Ring backend, NOT the (default) aws-lc-rs one — matches punktfunk-core + the client so the whole -# tree stays ring-only (no aws-lc-sys: a heavy C dep that fails to build on the Windows CI runner). +# aws-lc-rs backend, matching punktfunk-core + the clients (a dissenting crate would pull a +# second crypto stack in). `prefer-post-quantum` offers X25519MLKEM768 first on the mgmt/native +# TLS 1.3 listeners; classical curves stay in the list, so a client without ML-KEM still connects. # Keep `tls12` for GameStream/Moonlight clients that negotiate TLS 1.2. -rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] } +rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "prefer-post-quantum", "std", "tls12", "logging"] } # Manual HTTPS+mTLS serve loop for the mgmt API (axum-server can't surface the peer cert): a # tokio-rustls handshake exposes the client cert, then hyper serves the axum Router with the # verified fingerprint injected as a request extension. Versions match the workspace lock. -tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12", "logging"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["aws_lc_rs", "tls12", "logging"] } hyper = { version = "1", features = ["server", "http1", "http2"] } hyper-util = { version = "0.1", features = ["server", "server-auto", "tokio", "service"] } tower = { version = "0.5", features = ["util"] } @@ -122,10 +131,12 @@ serde_json = "1" # utoipa into axum 0.8 extractors; utoipa-axum collects `#[utoipa::path]` routes into the # spec; utoipa-scalar serves the interactive docs. Codegen-friendly: the spec is emitted # verbatim by the `openapi` subcommand. Control plane only — never the per-frame path. -# Plugin-store index signatures: ed25519 verification of a catalog document before any field of -# it is read (store/index.rs). Already in the tree via rustls — the workspace is ring-only, so this -# is the one signature primitive available without pulling aws-lc-sys (which fails on Windows CI). -ring = "0.17" +# SHA-256 over the downloaded installer and its signing-leaf DER (update/windows.rs) — Windows-only +# in practice, the plugin-store's ed25519 path re-exports pf-update-check's verifier. Already in the +# tree via rustls; its API is ring-compatible by design, which is what made the swap mechanical. +# `prebuilt-nasm`: see pf-update-check's copy — it keeps aws-lc-sys building on Windows x86_64 +# with no NASM on the box, whatever else the build happens to select. +aws-lc-rs = { version = "1", features = ["prebuilt-nasm"] } # Semver comparisons for the plugin store: `minHost` gating and the revocation list's version # ranges (`<0.3.2`). Already in the lockfile transitively. semver = "1" diff --git a/crates/punktfunk-host/src/gamestream/mod.rs b/crates/punktfunk-host/src/gamestream/mod.rs index b5beaa99a..9a42eb1d6 100644 --- a/crates/punktfunk-host/src/gamestream/mod.rs +++ b/crates/punktfunk-host/src/gamestream/mod.rs @@ -459,7 +459,7 @@ pub fn serve( let rt = tokio::runtime::Runtime::new().context("build tokio runtime")?; rt.block_on(async move { // rustls needs a process-wide crypto provider before any TLS config is built. - let _ = rustls::crypto::ring::default_provider().install_default(); + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); let native_opts = crate::native::native_serve_opts(&native); // The hook runner consumes the live event tail for the host's lifetime — spawned BEFORE // `host.started` is emitted so operator hooks observe the full lifecycle (RFC §6). diff --git a/crates/punktfunk-host/src/gamestream/tls.rs b/crates/punktfunk-host/src/gamestream/tls.rs index a5643eed5..33910fd71 100644 --- a/crates/punktfunk-host/src/gamestream/tls.rs +++ b/crates/punktfunk-host/src/gamestream/tls.rs @@ -292,7 +292,7 @@ fn build_server_config( key_pem: &str, mandatory: bool, ) -> Result> { - let provider = Arc::new(rustls::crypto::ring::default_provider()); + let provider = Arc::new(rustls::crypto::aws_lc_rs::default_provider()); // PEM parsing via rustls-pki-types (the same `PemObject` path punktfunk-core/quic.rs uses), // so we don't pull the unmaintained `rustls-pemfile`. let certs = CertificateDer::pem_slice_iter(cert_pem.as_bytes()) diff --git a/crates/punktfunk-host/src/main.rs b/crates/punktfunk-host/src/main.rs index d0ab6ce08..2fa08ef91 100644 --- a/crates/punktfunk-host/src/main.rs +++ b/crates/punktfunk-host/src/main.rs @@ -148,6 +148,9 @@ use spike::{Options, Source}; use std::path::PathBuf; fn main() { + // Before anything can reach an HTTPS call (the cover-art warmer, webhooks, the plugin-store + // catalog, the update downloader all build default `ureq` agents). + punktfunk_core::tls::install_default_provider(); let filter = tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| "info".into()); // `service run` is launched by the SCM with no console — log to a file instead of stderr. diff --git a/crates/punktfunk-host/src/update/windows.rs b/crates/punktfunk-host/src/update/windows.rs index 8d43510b5..a32f9b1cd 100644 --- a/crates/punktfunk-host/src/update/windows.rs +++ b/crates/punktfunk-host/src/update/windows.rs @@ -234,7 +234,7 @@ fn download(url: &str, part: &Path, progress: &dyn Fn(u64, Option)) -> Resu fn verify_sha256(path: &Path, expected_hex: &str) -> Result<(), String> { let mut file = std::fs::File::open(path).map_err(|e| format!("open for hashing: {e}"))?; - let mut ctx = ring::digest::Context::new(&ring::digest::SHA256); + let mut ctx = aws_lc_rs::digest::Context::new(&aws_lc_rs::digest::SHA256); let mut buf = [0u8; 128 * 1024]; loop { let n = file @@ -366,7 +366,7 @@ pub(crate) fn verify_authenticode(path: &Path, pins: &[String]) -> Result<(), St // cert context above; the slice is consumed (hashed) before the state is closed. let der = unsafe { std::slice::from_raw_parts(leaf.pbCertEncoded, leaf.cbCertEncoded as usize) }; - let fp = hex(ring::digest::digest(&ring::digest::SHA256, der).as_ref()); + let fp = hex(aws_lc_rs::digest::digest(&aws_lc_rs::digest::SHA256, der).as_ref()); if !pins.iter().any(|p| p.eq_ignore_ascii_case(&fp)) { return Err(format!( "installer signing-leaf fingerprint {fp} matches none of the manifest's \ diff --git a/crates/punktfunk-tray/Cargo.toml b/crates/punktfunk-tray/Cargo.toml index db0644ca2..a9af10010 100644 --- a/crates/punktfunk-tray/Cargo.toml +++ b/crates/punktfunk-tray/Cargo.toml @@ -22,16 +22,15 @@ anyhow = "1" [target.'cfg(any(windows, target_os = "linux"))'.dependencies] serde = { version = "1", features = ["derive"] } serde_json = "1" -# Loopback HTTPS poll of GET /api/v1/local/summary. Same sync ureq + rustls(ring) stack and -# custom-verifier pattern as the Linux client's library fetch (crates/pf-client-core/src/library.rs) — -# but ring-only (no default aws-lc-rs provider: it needs a C toolchain per target and the agent -# pins the ring provider explicitly anyway). +# Loopback HTTPS poll of GET /api/v1/local/summary. Same sync ureq + rustls stack and +# custom-verifier pattern as the Linux client's library fetch (crates/pf-client-core/src/library.rs), +# on the same aws-lc-rs backend as the rest of the tree (the agent pins the provider explicitly). ureq = { version = "2", default-features = false, features = ["tls"] } -rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] } +rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "prefer-post-quantum", "logging", "std", "tls12"] } # The one shared cert-fingerprint pin verifier (`punktfunk_core::tls::PinVerify`) + fingerprint # hash, instead of the tray hand-rolling its own copy on a trust boundary. The light `tls` feature -# is rustls + sha2 only (no QUIC runtime / tokio), so this stays a lean helper; core is a pure-Rust -# leaf (no C toolchain), unlike the host dependency ruled out above. +# is rustls + sha2 only (no QUIC runtime / tokio), so this stays a lean helper — much smaller than +# the host dependency ruled out above, though rustls's aws-lc-rs backend does mean a C compiler. punktfunk-core = { path = "../punktfunk-core", default-features = false, features = ["tls"] } [target.'cfg(windows)'.dependencies] diff --git a/crates/punktfunk-tray/src/main.rs b/crates/punktfunk-tray/src/main.rs index 6f6eef46b..68268172a 100644 --- a/crates/punktfunk-tray/src/main.rs +++ b/crates/punktfunk-tray/src/main.rs @@ -79,6 +79,10 @@ fn parse_args() -> anyhow::Result { } fn main() -> anyhow::Result<()> { + // punktfunk-core is a Windows/Linux-only dependency here (the macOS build is a stub), so the + // provider install follows the same cfg as `run`. + #[cfg(any(windows, target_os = "linux"))] + punktfunk_core::tls::install_default_provider(); let args = parse_args()?; run(args) } diff --git a/crates/punktfunk-tray/src/status.rs b/crates/punktfunk-tray/src/status.rs index bb78b946e..f978ac429 100644 --- a/crates/punktfunk-tray/src/status.rs +++ b/crates/punktfunk-tray/src/status.rs @@ -310,10 +310,10 @@ pub fn punktfunk_config_dir() -> Option { None } -/// A sync HTTPS agent over the same rustls(ring) stack the rest of the workspace uses, with a +/// A sync HTTPS agent over the same rustls(aws-lc-rs) stack the rest of the workspace uses, with a /// pin-or-accept-any verifier (the Linux client's `PinVerify` pattern, `library.rs`). fn agent(pin: Option<[u8; 32]>) -> ureq::Agent { - let provider = Arc::new(rustls::crypto::ring::default_provider()); + let provider = Arc::new(rustls::crypto::aws_lc_rs::default_provider()); let cfg = rustls::ClientConfig::builder_with_provider(provider) .with_safe_default_protocol_versions() .expect("rustls default protocol versions")