diff --git a/CHANGELOG.md b/CHANGELOG.md index 299e125c5f..095ba25596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.25.2] - 2023-02-01 + +This version of Rustup changes the signature verification code to continue +accepting Rust's release signature key, which previously caused warnings due to +a time-based check. + +Note that signature verification in Rustup is still an experimental feature, +and there is intentionally no way to enforce signature verification due to the +feature being incomplete. + +Thanks go to: + +- Pietro Albini +- Daniel Silverstone + +[1.25.2]: https://github.com/rust-lang/rustup/release/tag/1.25.2 + ## [1.25.1] - 2022-07-12 This version of Rustup reverts a single PR from 1.25.1 and tidies a couple of internal diff --git a/Cargo.lock b/Cargo.lock index 26fe66360e..330762c983 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -644,7 +644,7 @@ dependencies = [ [[package]] name = "download" -version = "1.25.1" +version = "1.25.2" dependencies = [ "anyhow", "curl", @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "rustup" -version = "1.25.1" +version = "1.25.2" dependencies = [ "anyhow", "cc", diff --git a/Cargo.toml b/Cargo.toml index 3c106350f7..e67acf8e72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" name = "rustup" readme = "README.md" repository = "https://github.com/rust-lang/rustup" -version = "1.25.1" +version = "1.25.2" [features] curl-backend = ["download/curl-backend"] diff --git a/ci/docker/mips-unknown-linux-gnu/Dockerfile b/ci/docker/mips-unknown-linux-gnu/Dockerfile index fee887b174..5801ef9d0b 100644 --- a/ci/docker/mips-unknown-linux-gnu/Dockerfile +++ b/ci/docker/mips-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ FROM rust-mips-unknown-linux-gnu -ENV CC_mips_unknown_linux_gnu=mips-linux-gnu-gcc \ - CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc +ENV CC_mips_unknown_linux_gnu=mips-unknown-linux-gnu-gcc \ + CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-unknown-linux-gnu-gcc diff --git a/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile b/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile index 18aaafb432..8345fe421d 100644 --- a/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile +++ b/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile @@ -1,4 +1,4 @@ FROM rust-mips64-unknown-linux-gnuabi64 -ENV CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \ - CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc +ENV CC_mips64_unknown_linux_gnuabi64=mips64-unknown-linux-gnu-gcc \ + CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-unknown-linux-gnu-gcc diff --git a/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile b/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile index 8eaf5281e8..c0e5871c93 100644 --- a/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile +++ b/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile @@ -1,4 +1,4 @@ FROM rust-mips64el-unknown-linux-gnuabi64 -ENV CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc \ - CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-gcc +ENV CC_mips64el_unknown_linux_gnuabi64=mips64el-unknown-linux-gnu-gcc \ + CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-unknown-linux-gnu-gcc diff --git a/ci/docker/mipsel-unknown-linux-gnu/Dockerfile b/ci/docker/mipsel-unknown-linux-gnu/Dockerfile index 48eb00bbc5..ee9161fac5 100644 --- a/ci/docker/mipsel-unknown-linux-gnu/Dockerfile +++ b/ci/docker/mipsel-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ FROM rust-mipsel-unknown-linux-gnu -ENV CC_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc \ - CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc +ENV CC_mipsel_unknown_linux_gnu=mipsel-unknown-linux-gnu-gcc \ + CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-unknown-linux-gnu-gcc diff --git a/download/Cargo.toml b/download/Cargo.toml index f7ca9ac3b9..5bf0aa523d 100644 --- a/download/Cargo.toml +++ b/download/Cargo.toml @@ -4,7 +4,7 @@ authors = ["Brian Anderson "] edition = "2021" license = "MIT OR Apache-2.0" name = "download" -version = "1.25.1" +version = "1.25.2" [features] diff --git a/rustup-init.sh b/rustup-init.sh index 3ce77eadb2..27589d8038 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -25,7 +25,7 @@ RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}" #XXX: If you change anything here, please make the same changes in setup_mode.rs usage() { cat 1>&2 < StandardPolicy<'static> { + let mut policy = StandardPolicy::new(); + + // The builtin Rust signature key uses SHA-1 for its own signature, even though the individual + // signatures generated by it nowadays use SHA-512. Sequoia added a cutoff date for SHA1, + // 2023-02-01, which caused warnings to be displayed to rustup users from that day onwards. + // + // To keep supporting the Rust signature key, we allow the SHA-1 algorithm in rustup without a + // cutoff date when verifying the signature key bindings. SHA-1 data signatures are still + // disallowed. + policy.reject_hash_property_at( + HashAlgorithm::SHA1, + HashAlgoSecurity::SecondPreImageResistance, + None, + ); + + policy +} + /// Returns the index of the cert in `certs` that verifies a /// signature. /// @@ -26,7 +47,8 @@ pub(crate) fn verify_signature( signature: &str, certs: &[PgpPublicKey], ) -> Result> { - let p = policy::StandardPolicy::new(); + let p = sequoia_policy(); + let helper = Helper::new(certs); let mut v = DetachedVerifierBuilder::from_reader(signature.as_bytes())? .with_policy(&p, None, helper)?;