diff --git a/.cargo/config.toml b/.cargo/config.toml index 3c32d251..6c389b77 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + [target.aarch64-unknown-linux-gnu] linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6570d43..7f7062e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + --- name: CI diff --git a/.gitignore b/.gitignore index 113c63cb..6ad627e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + /target /docs/node_modules /docs/build diff --git a/.gitmodules b/.gitmodules index 8ffbb392..bb04478a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + [submodule "docs/shared"] path = docs/shared url = https://github.com/ferrocene/sphinx-shared-resources diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 00000000..ac29a710 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,6 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: *.snap + Cargo.lock +Copyright: Ferrous Systems GmbH +License: MIT OR Apache-2.0 diff --git a/Cargo.toml b/Cargo.toml index 8a7e3fbb..e0644cef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [workspace] members = [ "crates/criticaltrust", diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 00000000..137069b8 --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,73 @@ +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. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..2071b23b --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +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. diff --git a/bors.toml b/bors.toml index 95391d51..40a10af6 100644 --- a/bors.toml +++ b/bors.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # Gate PRs on the GitHub Actions workflow "CI" status = ["CI build successful"] diff --git a/crates/criticaltrust/Cargo.toml b/crates/criticaltrust/Cargo.toml index 77936a36..85d7a7e4 100644 --- a/crates/criticaltrust/Cargo.toml +++ b/crates/criticaltrust/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "criticaltrust" version = "0.4.0" diff --git a/crates/criticaltrust/src/errors.rs b/crates/criticaltrust/src/errors.rs index 32aa20ab..2fabe668 100644 --- a/crates/criticaltrust/src/errors.rs +++ b/crates/criticaltrust/src/errors.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::KeyRole; use thiserror::Error; diff --git a/crates/criticaltrust/src/integrity/detect_manifest.rs b/crates/criticaltrust/src/integrity/detect_manifest.rs index 15070c48..2b0bf64d 100644 --- a/crates/criticaltrust/src/integrity/detect_manifest.rs +++ b/crates/criticaltrust/src/integrity/detect_manifest.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use std::path; /// Checks whether the provided path is the expected path of a package manifest, and if so returns diff --git a/crates/criticaltrust/src/integrity/mod.rs b/crates/criticaltrust/src/integrity/mod.rs index a0846dbd..edd1f5b3 100644 --- a/crates/criticaltrust/src/integrity/mod.rs +++ b/crates/criticaltrust/src/integrity/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! High-level interface to verify the integrity of archives and installations. mod detect_manifest; diff --git a/crates/criticaltrust/src/integrity/verifier.rs b/crates/criticaltrust/src/integrity/verifier.rs index 0810c4b6..28cd143b 100644 --- a/crates/criticaltrust/src/integrity/verifier.rs +++ b/crates/criticaltrust/src/integrity/verifier.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::integrity::detect_manifest::{is_package_manifest, FoundPackageManifest}; use crate::integrity::IntegrityError; use crate::manifests::{PackageFile, PackageManifest}; diff --git a/crates/criticaltrust/src/keys/algorithms/ecdsa_p256_sha256_asn1_spki_der.rs b/crates/criticaltrust/src/keys/algorithms/ecdsa_p256_sha256_asn1_spki_der.rs index c0e5aad9..62cedb2d 100644 --- a/crates/criticaltrust/src/keys/algorithms/ecdsa_p256_sha256_asn1_spki_der.rs +++ b/crates/criticaltrust/src/keys/algorithms/ecdsa_p256_sha256_asn1_spki_der.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::algorithms::Algorithm; use crate::keys::newtypes::{PayloadBytes, PrivateKeyBytes, PublicKeyBytes, SignatureBytes}; use crate::Error; diff --git a/crates/criticaltrust/src/keys/algorithms/mod.rs b/crates/criticaltrust/src/keys/algorithms/mod.rs index 01897de0..3d76e096 100644 --- a/crates/criticaltrust/src/keys/algorithms/mod.rs +++ b/crates/criticaltrust/src/keys/algorithms/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod ecdsa_p256_sha256_asn1_spki_der; use crate::keys::algorithms::ecdsa_p256_sha256_asn1_spki_der::EcdsaP256Sha256Asn1SpkiDer; diff --git a/crates/criticaltrust/src/keys/mod.rs b/crates/criticaltrust/src/keys/mod.rs index 06d8621c..18b9726c 100644 --- a/crates/criticaltrust/src/keys/mod.rs +++ b/crates/criticaltrust/src/keys/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Low-level keys and digital signature management. //! //! This module provides a safe and secure abstraction over the cryptographic primitives used by diff --git a/crates/criticaltrust/src/keys/newtypes.rs b/crates/criticaltrust/src/keys/newtypes.rs index eee67ea7..06b326a2 100644 --- a/crates/criticaltrust/src/keys/newtypes.rs +++ b/crates/criticaltrust/src/keys/newtypes.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Newtypes used by the `keys` module to prevent errors at the type system level. //! //! APIs in the `keys` module require multiple byte slices as their input, and it would be easy to diff --git a/crates/criticaltrust/src/keys/pair.rs b/crates/criticaltrust/src/keys/pair.rs index 3f1017f1..a4ed1b01 100644 --- a/crates/criticaltrust/src/keys/pair.rs +++ b/crates/criticaltrust/src/keys/pair.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::newtypes::{PayloadBytes, SignatureBytes}; use crate::keys::PublicKey; use crate::Error; diff --git a/crates/criticaltrust/src/keys/pair_aws_kms.rs b/crates/criticaltrust/src/keys/pair_aws_kms.rs index c8216c19..7bb892aa 100644 --- a/crates/criticaltrust/src/keys/pair_aws_kms.rs +++ b/crates/criticaltrust/src/keys/pair_aws_kms.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use super::newtypes::{PayloadBytes, SignatureBytes}; use super::PublicKey; use crate::keys::newtypes::PublicKeyBytes; diff --git a/crates/criticaltrust/src/keys/pair_ephemeral.rs b/crates/criticaltrust/src/keys/pair_ephemeral.rs index bf3a9058..eb1693eb 100644 --- a/crates/criticaltrust/src/keys/pair_ephemeral.rs +++ b/crates/criticaltrust/src/keys/pair_ephemeral.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::newtypes::{PayloadBytes, PrivateKeyBytes, SignatureBytes}; use crate::keys::{KeyAlgorithm, KeyPair, KeyRole, PublicKey}; use crate::Error; diff --git a/crates/criticaltrust/src/keys/public.rs b/crates/criticaltrust/src/keys/public.rs index 8f5e9389..62deda3c 100644 --- a/crates/criticaltrust/src/keys/public.rs +++ b/crates/criticaltrust/src/keys/public.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use super::newtypes::SignatureBytes; use crate::keys::newtypes::{PayloadBytes, PublicKeyBytes}; use crate::keys::KeyAlgorithm; diff --git a/crates/criticaltrust/src/lib.rs b/crates/criticaltrust/src/lib.rs index d53f3c7f..f6fb7df3 100644 --- a/crates/criticaltrust/src/lib.rs +++ b/crates/criticaltrust/src/lib.rs @@ -1,5 +1,8 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + pub mod errors; pub mod integrity; pub mod keys; diff --git a/crates/criticaltrust/src/manifests.rs b/crates/criticaltrust/src/manifests.rs index 26f4fddf..32803728 100644 --- a/crates/criticaltrust/src/manifests.rs +++ b/crates/criticaltrust/src/manifests.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Serializable and deserializable representation of criticaltrust manifests. use crate::keys::{KeyRole, PublicKey}; diff --git a/crates/criticaltrust/src/serde_base64.rs b/crates/criticaltrust/src/serde_base64.rs index bae15219..0c647cf9 100644 --- a/crates/criticaltrust/src/serde_base64.rs +++ b/crates/criticaltrust/src/serde_base64.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Wrapper functions to encode/decode a string as base64 during serialization and deserialization. //! The module is supposed to be used by adding `#[serde(with = "crate::serde_base64")]` to each //! field you want to encode/decode as base64. diff --git a/crates/criticaltrust/src/sha256.rs b/crates/criticaltrust/src/sha256.rs index c219744f..b4103aa0 100644 --- a/crates/criticaltrust/src/sha256.rs +++ b/crates/criticaltrust/src/sha256.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use sha2::{Digest, Sha256}; /// Helper function to hash bytes with SHA256. It's a simple wrapper on top of the sha2 crate, diff --git a/crates/criticaltrust/src/signatures/keychain.rs b/crates/criticaltrust/src/signatures/keychain.rs index 598a9d74..e5eff184 100644 --- a/crates/criticaltrust/src/signatures/keychain.rs +++ b/crates/criticaltrust/src/signatures/keychain.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::{KeyId, KeyRole, PublicKey}; use crate::signatures::{PublicKeysRepository, SignedPayload}; use crate::Error; diff --git a/crates/criticaltrust/src/signatures/mod.rs b/crates/criticaltrust/src/signatures/mod.rs index 99664843..11cf8804 100644 --- a/crates/criticaltrust/src/signatures/mod.rs +++ b/crates/criticaltrust/src/signatures/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! High-level abstraction for key management and digital signature verification. //! //! This module provides [`SignedPayload`], a wrapper around digitally signed payloads that diff --git a/crates/criticaltrust/src/signatures/payload.rs b/crates/criticaltrust/src/signatures/payload.rs index febef7fc..1a8ba01b 100644 --- a/crates/criticaltrust/src/signatures/payload.rs +++ b/crates/criticaltrust/src/signatures/payload.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::newtypes::{PayloadBytes, SignatureBytes}; use crate::keys::{KeyId, KeyPair, KeyRole, PublicKey}; use crate::Error; diff --git a/crates/criticaltrust/src/test_utils.rs b/crates/criticaltrust/src/test_utils.rs index 6e3d1538..80c7895f 100644 --- a/crates/criticaltrust/src/test_utils.rs +++ b/crates/criticaltrust/src/test_utils.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::keys::{EphemeralKeyPair, KeyAlgorithm, KeyPair, KeyRole, PublicKey}; use crate::signatures::{Keychain, SignedPayload}; use base64::Engine; diff --git a/crates/criticalup-cli/Cargo.toml b/crates/criticalup-cli/Cargo.toml index fe05eef3..306bde5c 100644 --- a/crates/criticalup-cli/Cargo.toml +++ b/crates/criticalup-cli/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "criticalup-cli" version = "0.0.0" diff --git a/crates/criticalup-cli/README.md b/crates/criticalup-cli/README.md index a4cd2503..4f147720 100644 --- a/crates/criticalup-cli/README.md +++ b/crates/criticalup-cli/README.md @@ -1,3 +1,8 @@ + + `criticalup-cli` ---------------- diff --git a/crates/criticalup-cli/src/bin/criticalup-test.rs b/crates/criticalup-cli/src/bin/criticalup-test.rs index 94b64f71..f9dc57e6 100644 --- a/crates/criticalup-cli/src/bin/criticalup-test.rs +++ b/crates/criticalup-cli/src/bin/criticalup-test.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Variant of the criticalup binary with mocking support, used by the criticalup test suite to //! perform tests without connecting to the production download servers. diff --git a/crates/criticalup-cli/src/binary_proxies.rs b/crates/criticalup-cli/src/binary_proxies.rs index 65a63137..c4d78f99 100644 --- a/crates/criticalup-cli/src/binary_proxies.rs +++ b/crates/criticalup-cli/src/binary_proxies.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use crate::spawn; use criticalup_core::config::{Config, WhitelabelConfig}; diff --git a/crates/criticalup-cli/src/commands/auth.rs b/crates/criticalup-cli/src/commands/auth.rs index 579a7d48..3415f68b 100644 --- a/crates/criticalup-cli/src/commands/auth.rs +++ b/crates/criticalup-cli/src/commands/auth.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::{Error, LibError}; use crate::Context; use criticalup_core::download_server_client::DownloadServerClient; diff --git a/crates/criticalup-cli/src/commands/auth_remove.rs b/crates/criticalup-cli/src/commands/auth_remove.rs index fd0cb57e..91a20093 100644 --- a/crates/criticalup-cli/src/commands/auth_remove.rs +++ b/crates/criticalup-cli/src/commands/auth_remove.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use crate::Context; use criticalup_core::state::State; diff --git a/crates/criticalup-cli/src/commands/auth_set.rs b/crates/criticalup-cli/src/commands/auth_set.rs index df92ed8d..7fd8c77e 100644 --- a/crates/criticalup-cli/src/commands/auth_set.rs +++ b/crates/criticalup-cli/src/commands/auth_set.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::{Error, LibError}; use crate::Context; use atty::Stream; diff --git a/crates/criticalup-cli/src/commands/clean.rs b/crates/criticalup-cli/src/commands/clean.rs index 10bdf029..c744764f 100644 --- a/crates/criticalup-cli/src/commands/clean.rs +++ b/crates/criticalup-cli/src/commands/clean.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use std::fs; use std::path::{Path, PathBuf}; diff --git a/crates/criticalup-cli/src/commands/install.rs b/crates/criticalup-cli/src/commands/install.rs index 3036ad60..1856d367 100644 --- a/crates/criticalup-cli/src/commands/install.rs +++ b/crates/criticalup-cli/src/commands/install.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use std::path::{Path, PathBuf}; use owo_colors::OwoColorize; diff --git a/crates/criticalup-cli/src/commands/mod.rs b/crates/criticalup-cli/src/commands/mod.rs index 66d9f878..b02038f3 100644 --- a/crates/criticalup-cli/src/commands/mod.rs +++ b/crates/criticalup-cli/src/commands/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + pub(crate) mod auth; pub(crate) mod auth_remove; pub(crate) mod auth_set; diff --git a/crates/criticalup-cli/src/commands/remove.rs b/crates/criticalup-cli/src/commands/remove.rs index 153f2f6c..afffc5e2 100644 --- a/crates/criticalup-cli/src/commands/remove.rs +++ b/crates/criticalup-cli/src/commands/remove.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use crate::Context; use criticalup_core::project_manifest::ProjectManifest; diff --git a/crates/criticalup-cli/src/commands/run.rs b/crates/criticalup-cli/src/commands/run.rs index 878898b0..38b2064d 100644 --- a/crates/criticalup-cli/src/commands/run.rs +++ b/crates/criticalup-cli/src/commands/run.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use crate::errors::Error::BinaryNotInstalled; use crate::spawn::spawn_command; diff --git a/crates/criticalup-cli/src/commands/which.rs b/crates/criticalup-cli/src/commands/which.rs index 65432fa0..9e299668 100644 --- a/crates/criticalup-cli/src/commands/which.rs +++ b/crates/criticalup-cli/src/commands/which.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use crate::errors::Error::BinaryNotInstalled; use crate::Context; diff --git a/crates/criticalup-cli/src/errors.rs b/crates/criticalup-cli/src/errors.rs index c7c1308a..cc739738 100644 --- a/crates/criticalup-cli/src/errors.rs +++ b/crates/criticalup-cli/src/errors.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use criticaltrust::integrity::IntegrityError; pub(crate) use criticaltrust::Error as TrustError; pub(crate) use criticalup_core::errors::BinaryProxyUpdateError; diff --git a/crates/criticalup-cli/src/lib.rs b/crates/criticalup-cli/src/lib.rs index 6a753fde..ee2ba640 100644 --- a/crates/criticalup-cli/src/lib.rs +++ b/crates/criticalup-cli/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod binary_proxies; mod commands; mod errors; diff --git a/crates/criticalup-cli/src/spawn.rs b/crates/criticalup-cli/src/spawn.rs index 1843dbad..5ffa86e5 100644 --- a/crates/criticalup-cli/src/spawn.rs +++ b/crates/criticalup-cli/src/spawn.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::Error; use std::process::Command; diff --git a/crates/criticalup-cli/tests/cli/auth.rs b/crates/criticalup-cli/tests/cli/auth.rs index c48a8e80..143832e0 100644 --- a/crates/criticalup-cli/tests/cli/auth.rs +++ b/crates/criticalup-cli/tests/cli/auth.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{TestEnvironment, MOCK_AUTH_TOKENS}; diff --git a/crates/criticalup-cli/tests/cli/auth_remove.rs b/crates/criticalup-cli/tests/cli/auth_remove.rs index 25a86e5f..8324d5e7 100644 --- a/crates/criticalup-cli/tests/cli/auth_remove.rs +++ b/crates/criticalup-cli/tests/cli/auth_remove.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{TestEnvironment, MOCK_AUTH_TOKENS}; use serde::Deserialize; diff --git a/crates/criticalup-cli/tests/cli/auth_set.rs b/crates/criticalup-cli/tests/cli/auth_set.rs index c3eaa3c5..c62982d9 100644 --- a/crates/criticalup-cli/tests/cli/auth_set.rs +++ b/crates/criticalup-cli/tests/cli/auth_set.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{stdin, TestEnvironment, MOCK_AUTH_TOKENS}; use regex::Regex; diff --git a/crates/criticalup-cli/tests/cli/binary_proxies.rs b/crates/criticalup-cli/tests/cli/binary_proxies.rs index 93f646fe..03a7fdc7 100644 --- a/crates/criticalup-cli/tests/cli/binary_proxies.rs +++ b/crates/criticalup-cli/tests/cli/binary_proxies.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::TestEnvironment; use std::io::Write; diff --git a/crates/criticalup-cli/tests/cli/clean.rs b/crates/criticalup-cli/tests/cli/clean.rs index 152a62a1..013423a1 100644 --- a/crates/criticalup-cli/tests/cli/clean.rs +++ b/crates/criticalup-cli/tests/cli/clean.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::TestEnvironment; use serde_json::{json, Value}; diff --git a/crates/criticalup-cli/tests/cli/install.rs b/crates/criticalup-cli/tests/cli/install.rs index 6d228c56..e4683bfc 100644 --- a/crates/criticalup-cli/tests/cli/install.rs +++ b/crates/criticalup-cli/tests/cli/install.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{auth_set_with_valid_token, construct_toolchains_product_path, TestEnvironment}; use serde_json::json; diff --git a/crates/criticalup-cli/tests/cli/main.rs b/crates/criticalup-cli/tests/cli/main.rs index 57253fe7..2a1c344a 100644 --- a/crates/criticalup-cli/tests/cli/main.rs +++ b/crates/criticalup-cli/tests/cli/main.rs @@ -1,5 +1,8 @@ #![allow(clippy::wrong_self_convention)] +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod auth; mod auth_remove; mod auth_set; diff --git a/crates/criticalup-cli/tests/cli/remove.rs b/crates/criticalup-cli/tests/cli/remove.rs index ec06f610..724964d2 100644 --- a/crates/criticalup-cli/tests/cli/remove.rs +++ b/crates/criticalup-cli/tests/cli/remove.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{construct_toolchains_product_path, TestEnvironment}; use serde_json::{json, Value}; diff --git a/crates/criticalup-cli/tests/cli/root.rs b/crates/criticalup-cli/tests/cli/root.rs index e92b8042..ba783fb6 100644 --- a/crates/criticalup-cli/tests/cli/root.rs +++ b/crates/criticalup-cli/tests/cli/root.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::TestEnvironment; diff --git a/crates/criticalup-cli/tests/cli/run.rs b/crates/criticalup-cli/tests/cli/run.rs index 2bdb4ece..cac5e42e 100644 --- a/crates/criticalup-cli/tests/cli/run.rs +++ b/crates/criticalup-cli/tests/cli/run.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::TestEnvironment; use criticalup_core::project_manifest::ProjectManifest; diff --git a/crates/criticalup-cli/tests/cli/utils.rs b/crates/criticalup-cli/tests/cli/utils.rs index d2c609ed..6b56dae5 100644 --- a/crates/criticalup-cli/tests/cli/utils.rs +++ b/crates/criticalup-cli/tests/cli/utils.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use criticaltrust::keys::{EphemeralKeyPair, KeyAlgorithm, KeyPair, KeyRole, PublicKey}; use criticaltrust::manifests::{Release, ReleaseManifest}; use criticaltrust::signatures::SignedPayload; diff --git a/crates/criticalup-cli/tests/cli/which.rs b/crates/criticalup-cli/tests/cli/which.rs index 01292fff..b565c795 100644 --- a/crates/criticalup-cli/tests/cli/which.rs +++ b/crates/criticalup-cli/tests/cli/which.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::assert_output; use crate::utils::{construct_toolchains_product_path, TestEnvironment}; use criticalup_core::project_manifest::ProjectManifest; diff --git a/crates/criticalup-cli/tests/resources/criticalup-which.toml b/crates/criticalup-cli/tests/resources/criticalup-which.toml index b97f5605..b8a0f6cb 100644 --- a/crates/criticalup-cli/tests/resources/criticalup-which.toml +++ b/crates/criticalup-cli/tests/resources/criticalup-which.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # Manifest for test manifest-version = 1 diff --git a/crates/criticalup-cli/tests/resources/criticalup.toml b/crates/criticalup-cli/tests/resources/criticalup.toml index a0568fc8..5d2b3a50 100644 --- a/crates/criticalup-cli/tests/resources/criticalup.toml +++ b/crates/criticalup-cli/tests/resources/criticalup.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # Manifest for test manifest-version = 1 diff --git a/crates/criticalup-core/Cargo.toml b/crates/criticalup-core/Cargo.toml index 375f7ca2..d8770ea9 100644 --- a/crates/criticalup-core/Cargo.toml +++ b/crates/criticalup-core/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "criticalup-core" version = "0.0.0" diff --git a/crates/criticalup-core/build.rs b/crates/criticalup-core/build.rs index 84f35814..7682b257 100644 --- a/crates/criticalup-core/build.rs +++ b/crates/criticalup-core/build.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + fn main() { println!( "cargo:rustc-env=TARGET={}", diff --git a/crates/criticalup-core/src/binary_proxies.rs b/crates/criticalup-core/src/binary_proxies.rs index 4fd07174..e0fdb252 100644 --- a/crates/criticalup-core/src/binary_proxies.rs +++ b/crates/criticalup-core/src/binary_proxies.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + //! Binary proxies are binaries named after the tools included in Ferrocene (like rustc, rustdoc, //! cargo, etc...), that check which criticalup installation to use before executing the actual //! binary inside of the chosen criticalup installation. diff --git a/crates/criticalup-core/src/config/mod.rs b/crates/criticalup-core/src/config/mod.rs index a31fa289..3cc36dba 100644 --- a/crates/criticalup-core/src/config/mod.rs +++ b/crates/criticalup-core/src/config/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod paths; use self::paths::Paths; diff --git a/crates/criticalup-core/src/config/paths.rs b/crates/criticalup-core/src/config/paths.rs index 58a0fb95..93492da3 100644 --- a/crates/criticalup-core/src/config/paths.rs +++ b/crates/criticalup-core/src/config/paths.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::config::WhitelabelConfig; use crate::errors::Error; use std::env; diff --git a/crates/criticalup-core/src/download_server_client.rs b/crates/criticalup-core/src/download_server_client.rs index 5c937362..796c2761 100644 --- a/crates/criticalup-core/src/download_server_client.rs +++ b/crates/criticalup-core/src/download_server_client.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::config::Config; use crate::errors::{DownloadServerError, Error}; use crate::state::State; diff --git a/crates/criticalup-core/src/errors.rs b/crates/criticalup-core/src/errors.rs index 14947fde..af1b6613 100644 --- a/crates/criticalup-core/src/errors.rs +++ b/crates/criticalup-core/src/errors.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use criticaltrust::Error as TrustError; use reqwest::Error as ReqError; use reqwest::StatusCode; diff --git a/crates/criticalup-core/src/lib.rs b/crates/criticalup-core/src/lib.rs index 81885693..9cb22794 100644 --- a/crates/criticalup-core/src/lib.rs +++ b/crates/criticalup-core/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + pub mod binary_proxies; pub mod config; pub mod download_server_client; diff --git a/crates/criticalup-core/src/project_manifest/mod.rs b/crates/criticalup-core/src/project_manifest/mod.rs index 7a3b1cc5..7c7e2147 100644 --- a/crates/criticalup-core/src/project_manifest/mod.rs +++ b/crates/criticalup-core/src/project_manifest/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod substitutions; mod v1; diff --git a/crates/criticalup-core/src/project_manifest/substitutions.rs b/crates/criticalup-core/src/project_manifest/substitutions.rs index d205c425..91852868 100644 --- a/crates/criticalup-core/src/project_manifest/substitutions.rs +++ b/crates/criticalup-core/src/project_manifest/substitutions.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::ProjectManifestLoadingError; const VARIABLE_START: &str = "${"; diff --git a/crates/criticalup-core/src/project_manifest/v1.rs b/crates/criticalup-core/src/project_manifest/v1.rs index d9df1523..6423d11a 100644 --- a/crates/criticalup-core/src/project_manifest/v1.rs +++ b/crates/criticalup-core/src/project_manifest/v1.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use serde::Deserialize; use std::collections::HashMap; diff --git a/crates/criticalup-core/src/state.rs b/crates/criticalup-core/src/state.rs index f3166256..7b74e7f4 100644 --- a/crates/criticalup-core/src/state.rs +++ b/crates/criticalup-core/src/state.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use std::cell::{Ref, RefCell}; use std::collections::{BTreeMap, BTreeSet}; use std::io::Write; diff --git a/crates/criticalup-core/src/test_utils.rs b/crates/criticalup-core/src/test_utils.rs index 609dd0e7..f05f51fb 100644 --- a/crates/criticalup-core/src/test_utils.rs +++ b/crates/criticalup-core/src/test_utils.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::config::Config; use crate::download_server_client::DownloadServerClient; use crate::state::{AuthenticationToken, State}; diff --git a/crates/criticalup-core/src/utils.rs b/crates/criticalup-core/src/utils.rs index 22605793..3ab34945 100644 --- a/crates/criticalup-core/src/utils.rs +++ b/crates/criticalup-core/src/utils.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::errors::WriteFileError; use sha2::{Digest, Sha256}; use std::fs::File; diff --git a/crates/criticalup-dev/Cargo.toml b/crates/criticalup-dev/Cargo.toml index f20d27ac..313590ed 100644 --- a/crates/criticalup-dev/Cargo.toml +++ b/crates/criticalup-dev/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "criticalup-dev" version = "0.1.0" diff --git a/crates/criticalup-dev/README.md b/crates/criticalup-dev/README.md index b88146c4..b09a9d2d 100644 --- a/crates/criticalup-dev/README.md +++ b/crates/criticalup-dev/README.md @@ -1,3 +1,8 @@ + + `criticalup-dev` ---------------- @@ -44,4 +49,4 @@ criticalup-dev install [ferrocene-public-docs]: https://public-docs.ferrocene.dev/main/index.html [customer-portal]: https://customers-dev.ferrocene.dev/ -[customer-portal-tokens]: https://customers-dev.ferrocene.dev/users/tokens \ No newline at end of file +[customer-portal-tokens]: https://customers-dev.ferrocene.dev/users/tokens diff --git a/crates/criticalup-dev/src/main.rs b/crates/criticalup-dev/src/main.rs index 98d89744..21fe0cb4 100644 --- a/crates/criticalup-dev/src/main.rs +++ b/crates/criticalup-dev/src/main.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use criticaltrust::keys::newtypes::PublicKeyBytes; use criticaltrust::keys::{KeyAlgorithm, KeyRole, PublicKey}; diff --git a/crates/criticalup/Cargo.toml b/crates/criticalup/Cargo.toml index 86e79081..7fe9f24f 100644 --- a/crates/criticalup/Cargo.toml +++ b/crates/criticalup/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "criticalup" version = "0.1.0" diff --git a/crates/criticalup/README.md b/crates/criticalup/README.md index a114a40e..c701bf89 100644 --- a/crates/criticalup/README.md +++ b/crates/criticalup/README.md @@ -1,3 +1,8 @@ + + `criticalup` ------------ @@ -44,4 +49,4 @@ criticalup install [ferrocene-public-docs]: https://public-docs.ferrocene.dev/main/index.html [customer-portal]: https://customers.ferrocene.dev/ -[customer-portal-tokens]: https://customers.ferrocene.dev/users/tokens \ No newline at end of file +[customer-portal-tokens]: https://customers.ferrocene.dev/users/tokens diff --git a/crates/criticalup/src/main.rs b/crates/criticalup/src/main.rs index 17551af7..94620e08 100644 --- a/crates/criticalup/src/main.rs +++ b/crates/criticalup/src/main.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use criticaltrust::keys::newtypes::PublicKeyBytes; use criticaltrust::keys::{KeyAlgorithm, KeyRole, PublicKey}; diff --git a/crates/criticalup/wix/main.wxs.license b/crates/criticalup/wix/main.wxs.license new file mode 100644 index 00000000..4357476d --- /dev/null +++ b/crates/criticalup/wix/main.wxs.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2017 Christopher R. Field. +SPDX-License-Identifier: Apache-2.0 diff --git a/crates/mock-download-server/Cargo.toml b/crates/mock-download-server/Cargo.toml index e667690c..4439e22d 100644 --- a/crates/mock-download-server/Cargo.toml +++ b/crates/mock-download-server/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + [package] name = "mock-download-server" version = "0.0.0" diff --git a/crates/mock-download-server/src/handlers.rs b/crates/mock-download-server/src/handlers.rs index ba90d742..1fbaa306 100644 --- a/crates/mock-download-server/src/handlers.rs +++ b/crates/mock-download-server/src/handlers.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::Serialize; use crate::{AuthenticationToken, Data}; use criticaltrust::manifests::ManifestVersion; diff --git a/crates/mock-download-server/src/lib.rs b/crates/mock-download-server/src/lib.rs index 7c737230..ee96347a 100644 --- a/crates/mock-download-server/src/lib.rs +++ b/crates/mock-download-server/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + mod handlers; mod server; diff --git a/crates/mock-download-server/src/server.rs b/crates/mock-download-server/src/server.rs index 00014ea6..fa22f316 100644 --- a/crates/mock-download-server/src/server.rs +++ b/crates/mock-download-server/src/server.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: The Ferrocene Developers +// SPDX-License-Identifier: MIT OR Apache-2.0 + use crate::handlers::handle_request; use crate::Data; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/docs/.flake8 b/docs/.flake8 index 1ccc4f8e..3830da2f 100644 --- a/docs/.flake8 +++ b/docs/.flake8 @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + # Configuration recommended by Black # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8 diff --git a/docs/.gitignore b/docs/.gitignore index a0150b5c..4c020564 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + # Sphinx ignored files /build /.venv diff --git a/docs/.gitmodules b/docs/.gitmodules index 1d58fdb4..c0d84944 100644 --- a/docs/.gitmodules +++ b/docs/.gitmodules @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ferrous Systems GmbH +# +# SPDX-License-Identifier: MIT OR Apache-2.0 + [submodule "shared"] path = shared url = https://github.com/ferrocene/sphinx-shared-resources diff --git a/docs/README.rst b/docs/README.rst index 9876254e..4f52cb25 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + ================================ CriticalUp Documentation ================================ diff --git a/docs/make.py b/docs/make.py index 2c529ad5..1a614ec0 100755 --- a/docs/make.py +++ b/docs/make.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + import os import subprocess import sys diff --git a/docs/sphinx-substitutions.toml b/docs/sphinx-substitutions.toml index 1e023eeb..9147fe1f 100644 --- a/docs/sphinx-substitutions.toml +++ b/docs/sphinx-substitutions.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # This file defines all the substitutions available in the Sphinx documentation # sites using the `ferrocene_qualification` extension. diff --git a/docs/src/cli.rst b/docs/src/cli.rst index c953a2a3..a734061e 100644 --- a/docs/src/cli.rst +++ b/docs/src/cli.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _cli: Error Codes diff --git a/docs/src/conf.py b/docs/src/conf.py index 66d173b8..8143be80 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # -- Path setup -------------------------------------------------------------- import os diff --git a/docs/src/criticalup_toml.rst b/docs/src/criticalup_toml.rst index 3f9db39b..6bb274f3 100644 --- a/docs/src/criticalup_toml.rst +++ b/docs/src/criticalup_toml.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _criticalup_toml: criticalup.toml diff --git a/docs/src/index.rst b/docs/src/index.rst index e88b1109..44df5ce6 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + Ferrocene User Manual ===================== diff --git a/docs/src/install.rst b/docs/src/install.rst index c765c0a1..d22fb58e 100644 --- a/docs/src/install.rst +++ b/docs/src/install.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _install: Installing CriticalUp diff --git a/docs/src/overview.rst b/docs/src/overview.rst index 9be9532c..014cfed0 100644 --- a/docs/src/overview.rst +++ b/docs/src/overview.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _overview: Overview diff --git a/docs/src/platforms.rst b/docs/src/platforms.rst index 89170bc6..24c10c48 100644 --- a/docs/src/platforms.rst +++ b/docs/src/platforms.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _platforms: Platforms diff --git a/docs/src/system-requirements.rst b/docs/src/system-requirements.rst index cf9c7973..7e965374 100644 --- a/docs/src/system-requirements.rst +++ b/docs/src/system-requirements.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _system_requirements: System Requirements diff --git a/docs/src/using-criticalup/authenticating.rst b/docs/src/using-criticalup/authenticating.rst index 27b2845e..ec5e8733 100644 --- a/docs/src/using-criticalup/authenticating.rst +++ b/docs/src/using-criticalup/authenticating.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _authenticate: Authenticating diff --git a/docs/src/using-criticalup/running-tools.rst b/docs/src/using-criticalup/running-tools.rst index c0e2363e..b5ba8aa3 100644 --- a/docs/src/using-criticalup/running-tools.rst +++ b/docs/src/using-criticalup/running-tools.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _running_tools: Running Tools diff --git a/docs/src/using-criticalup/toolchain-management.rst b/docs/src/using-criticalup/toolchain-management.rst index 137d0e4b..08b41924 100644 --- a/docs/src/using-criticalup/toolchain-management.rst +++ b/docs/src/using-criticalup/toolchain-management.rst @@ -1,3 +1,6 @@ +.. SPDX-FileCopyrightText: The Ferrocene Developers +.. SPDX-License-Identifier: MIT OR Apache-2.0 + .. _toolchain_management: Toolchain Management diff --git a/docs/target-names.toml b/docs/target-names.toml index de1dbd9e..a9bfcdd9 100644 --- a/docs/target-names.toml +++ b/docs/target-names.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: The Ferrocene Developers +# SPDX-License-Identifier: MIT OR Apache-2.0 + # This file defines the human-readable names for the targets supported by # Ferrocene, to provide consistency across documents on how we refer to them. #