зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1806766 - Update headers to 0.3.8 and sha-1 to 0.10.5. r=emilio,supply-chain-reviewers
The sha-1 crate was renamed to sha1. Differential Revision: https://phabricator.services.mozilla.com/D165366
This commit is contained in:
Родитель
765c7f316e
Коммит
bb75df7beb
|
@ -2478,9 +2478,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "headers"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d"
|
||||
checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitflags",
|
||||
|
@ -2489,7 +2489,7 @@ dependencies = [
|
|||
"http",
|
||||
"httpdate",
|
||||
"mime",
|
||||
"sha-1",
|
||||
"sha1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4900,10 +4900,10 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha-1"
|
||||
version = "0.10.0"
|
||||
name = "sha1"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
|
||||
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cpufeatures",
|
||||
|
|
|
@ -924,6 +924,11 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
|
|||
criteria = "safe-to-deploy"
|
||||
delta = "0.7.0 -> 0.8.1"
|
||||
|
||||
[[audits.headers]]
|
||||
who = "Mike Hommey <mh+mozilla@glandium.org>"
|
||||
criteria = "safe-to-run"
|
||||
delta = "0.3.7 -> 0.3.8"
|
||||
|
||||
[[audits.hex]]
|
||||
who = "Simon Friedberger <simon@mozilla.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
@ -1526,6 +1531,11 @@ criteria = "safe-to-deploy"
|
|||
version = "0.1.1"
|
||||
notes = "Developed in-tree, effectively."
|
||||
|
||||
[[audits.sha1]]
|
||||
who = "Mike Hommey <mh+mozilla@glandium.org>"
|
||||
criteria = "safe-to-run"
|
||||
delta = "0.10.0 -> 0.10.5"
|
||||
|
||||
[[audits.slab]]
|
||||
who = "Mike Hommey <mh+mozilla@glandium.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
|
|
@ -1177,7 +1177,7 @@ criteria = "safe-to-run"
|
|||
version = "0.9.2"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.sha-1]]
|
||||
[[exemptions.sha1]]
|
||||
version = "0.10.0"
|
||||
criteria = "safe-to-run"
|
||||
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -11,7 +11,7 @@
|
|||
|
||||
[package]
|
||||
name = "headers"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
authors = ["Sean McArthur <sean@seanmonstar.com>"]
|
||||
description = "typed HTTP headers"
|
||||
homepage = "https://hyper.rs"
|
||||
|
@ -47,7 +47,7 @@ version = "1"
|
|||
[dependencies.mime]
|
||||
version = "0.3.14"
|
||||
|
||||
[dependencies.sha-1]
|
||||
[dependencies.sha1]
|
||||
version = "0.10"
|
||||
|
||||
[features]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#![deny(missing_debug_implementations)]
|
||||
#![cfg_attr(test, deny(warnings))]
|
||||
#![cfg_attr(all(test, feature = "nightly"), feature(test))]
|
||||
#![doc(html_root_url = "https://docs.rs/headers/0.3.7")]
|
||||
#![doc(html_root_url = "https://docs.rs/headers/0.3.8")]
|
||||
|
||||
//! # Typed HTTP Headers
|
||||
//!
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"files":{"CHANGELOG.md":"ca64c9ca42c8be8f5b6904acbaf7b764649b85f49a640e1ad7c14bc6b5477426","Cargo.toml":"64c2af944ed06cf83dad2cb07e03ee75d92e598e2b91e9574d7e84b9d54e2f76","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1","README.md":"e3e967137d854fef6c4a8c9d018c93bf35640a325a825b6a404dd3183219206c","benches/mod.rs":"2765aec429270711235d6cd4911d0c21658e2fa3dfbe24559f24e21b056b507c","src/compress.rs":"fd3f0c3905420d5380d23fd5b94c4f5adaa246f2b3e2a6567ac1874b012c3a53","src/compress/aarch64.rs":"b1e66c2df53eaf84ccf7466aed47c0718fc3dbe1d1c565b65abd60e84b6fc5d4","src/compress/soft.rs":"8ed37ffc419d9abafd5caa2b1a8b4c5b46ea9c5c323a03e956994f6edf40da74","src/compress/x86.rs":"04d800798c82796ff58821a1af6c20bef32ae6c682478cdf6958f84fce01e86f","src/lib.rs":"bc344cac1cb29136023d447ac98ce9d221ad9ca89673e8740d321fa78f3c71ba","tests/data/sha1.blb":"b9c03b9e56e0a7b08a6d6867599a33cab1a55aec3f41fef910c133fc35dc2851","tests/mod.rs":"34bb42bf4679b3f23ffc2338356c8579c872026eef9989955a29ba44a432c3b5"},"package":"028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"}
|
|
@ -1,105 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 0.10.0 (2021-12-07)
|
||||
### Changed
|
||||
- Update to `digest` v0.10 ([#217])
|
||||
|
||||
[#217]: https://github.com/RustCrypto/hashes/pull/217
|
||||
|
||||
## 0.9.8 (2021-08-27)
|
||||
### Changed
|
||||
- Bump `cpufeatures` dependency to 0.2 ([#306])
|
||||
|
||||
[#306]: https://github.com/RustCrypto/hashes/pull/306
|
||||
|
||||
## 0.9.7 (2021-07-18)
|
||||
### Changed
|
||||
- Make `aarch64` CPU feature detection OS-independent ([#276])
|
||||
- Bump `sha1-asm` to v0.5; support ARMv8 Crypto Extensions on Apple targets ([#289])
|
||||
|
||||
[#276]: https://github.com/RustCrypto/hashes/pull/276
|
||||
[#289]: https://github.com/RustCrypto/hashes/pull/289
|
||||
|
||||
## 0.9.6 (2021-05-11)
|
||||
### Changed
|
||||
- Use `cpufeatures` to detect intrinsics support on `aarch64` targets ([#268])
|
||||
|
||||
[#268]: https://github.com/RustCrypto/hashes/pull/268
|
||||
|
||||
## 0.9.5 (2021-05-05)
|
||||
### Changed
|
||||
- Switch from `cpuid-bool` to `cpufeatures` ([#263])
|
||||
|
||||
[#263]: https://github.com/RustCrypto/hashes/pull/263
|
||||
|
||||
## 0.9.4 (2021-02-16)
|
||||
### Added
|
||||
- Expose compression function under the `compress` feature flag. ([#238])
|
||||
|
||||
[#238]: https://github.com/RustCrypto/hashes/pull/238
|
||||
|
||||
## 0.9.3 (2021-02-01)
|
||||
### Changed
|
||||
- Use SHA1 intrinsics when `asm` feature is enabled. ([#225])
|
||||
|
||||
[#225]: https://github.com/RustCrypto/hashes/pull/225
|
||||
|
||||
## 0.9.2 (2020-11-04)
|
||||
### Added
|
||||
- `force-soft` feature to enforce use of software implementation. ([#203])
|
||||
|
||||
### Changed
|
||||
- `cfg-if` dependency updated to v1.0. ([#197])
|
||||
|
||||
[#197]: https://github.com/RustCrypto/hashes/pull/197
|
||||
[#203]: https://github.com/RustCrypto/hashes/pull/203
|
||||
|
||||
## 0.9.1 (2020-06-24)
|
||||
### Added
|
||||
- x86 hardware acceleration via SHA extension instrinsics. ([#167])
|
||||
|
||||
[#167]: https://github.com/RustCrypto/hashes/pull/167
|
||||
|
||||
## 0.9.0 (2020-06-09)
|
||||
### Changed
|
||||
- Update to `digest` v0.9 release; MSRV 1.41+ ([#155])
|
||||
- Use new `*Dirty` traits from the `digest` crate ([#153])
|
||||
- Bump `block-buffer` to v0.8 release ([#151])
|
||||
- Rename `*result*` to `finalize` ([#148])
|
||||
- Upgrade to Rust 2018 edition ([#132])
|
||||
- Use `libc` for `aarch64` consts ([#94])
|
||||
- Allow compile-time detection of crypto on `aarch64` ([#94])
|
||||
|
||||
[#155]: https://github.com/RustCrypto/hashes/pull/155
|
||||
[#153]: https://github.com/RustCrypto/hashes/pull/153
|
||||
[#151]: https://github.com/RustCrypto/hashes/pull/151
|
||||
[#148]: https://github.com/RustCrypto/hashes/pull/148
|
||||
[#132]: https://github.com/RustCrypto/hashes/pull/132
|
||||
[#94]: https://github.com/RustCrypto/hashes/pull/94
|
||||
|
||||
## 0.8.2 (2020-01-06)
|
||||
|
||||
## 0.8.1 (2018-11-14)
|
||||
|
||||
## 0.8.0 (2018-10-02)
|
||||
|
||||
## 0.7.0 (2017-11-15)
|
||||
|
||||
## 0.4.1 (2017-06-13)
|
||||
|
||||
## 0.4.0 (2017-06-12)
|
||||
|
||||
## 0.3.4 (2017-06-04)
|
||||
|
||||
## 0.3.3 (2017-05-09)
|
||||
|
||||
## 0.3.2 (2017-05-02)
|
||||
|
||||
## 0.3.1 (2017-04-18)
|
||||
|
||||
## 0.3.0 (2017-04-06)
|
|
@ -0,0 +1 @@
|
|||
{"files":{"CHANGELOG.md":"f3930b8a16e5173aca294672a3f83d44949160073cb7b20ed8eadc475f602b13","Cargo.toml":"03465b24b6574f22f50d0f1f4d7c972dd1098c50c457bda1035e9a7b9fa5bccd","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1","README.md":"e3e967137d854fef6c4a8c9d018c93bf35640a325a825b6a404dd3183219206c","benches/mod.rs":"2765aec429270711235d6cd4911d0c21658e2fa3dfbe24559f24e21b056b507c","src/compress.rs":"3e401e6a4ac3699994cedf34ff66d12a828bbef3457e8e751a3147a03a70607e","src/compress/aarch64.rs":"b1e66c2df53eaf84ccf7466aed47c0718fc3dbe1d1c565b65abd60e84b6fc5d4","src/compress/soft.rs":"bc6dda22b15acd76d97e202a8b251d9c68441d426a71600b2a61c36dd6f3a08e","src/compress/x86.rs":"9d2b4f240a311a84b351c136cccdc4dc00a7fc35703146ad51ed2d6e0aaef2d0","src/lib.rs":"dea41278ae1d72c64925a1b417d343068edf0c92e87b9f2350f31d78ef1ef7cd","tests/data/sha1.blb":"b9c03b9e56e0a7b08a6d6867599a33cab1a55aec3f41fef910c133fc35dc2851","tests/mod.rs":"34bb42bf4679b3f23ffc2338356c8579c872026eef9989955a29ba44a432c3b5"},"package":"f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"}
|
|
@ -0,0 +1,42 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 0.10.5 (2022-09-16)
|
||||
### Added
|
||||
- Feature-gated OID support ([#405])
|
||||
|
||||
[#405]: https://github.com/RustCrypto/hashes/pull/405
|
||||
|
||||
## 0.10.4 (2022-09-02)
|
||||
### Fixed
|
||||
- MSRV issue which was not resolved by v0.10.3 ([#401])
|
||||
|
||||
[#401]: https://github.com/RustCrypto/hashes/pull/401
|
||||
|
||||
## 0.10.3 (2022-09-02)
|
||||
### Fixed
|
||||
- MSRV issue caused by publishing v0.10.2 using a buggy Nightly toolchain ([#399])
|
||||
|
||||
[#399]: https://github.com/RustCrypto/hashes/pull/399
|
||||
|
||||
## 0.10.2 (2022-08-30)
|
||||
### Changed
|
||||
- Ignore `asm` feature on unsupported targets ([#388])
|
||||
|
||||
[#388]: https://github.com/RustCrypto/hashes/pull/388
|
||||
|
||||
## 0.10.1 (2022-02-17)
|
||||
### Fixed
|
||||
- Minimal versions build ([#363])
|
||||
|
||||
[#363]: https://github.com/RustCrypto/hashes/pull/363
|
||||
|
||||
## 0.10.0 (2022-01-17)
|
||||
### Changed
|
||||
- The crate is transferred to the RustCrypto organization. New implementation is identical to the `sha-1 v0.10.0` crate and expressed in terms of traits from the `digest` crate. ([#350])
|
||||
|
||||
[#350]: https://github.com/RustCrypto/hashes/pull/350
|
|
@ -3,19 +3,20 @@
|
|||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g., crates.io) dependencies.
|
||||
# to registry (e.g., crates.io) dependencies
|
||||
#
|
||||
# If you are reading this file be aware that the original Cargo.toml
|
||||
# will likely look very different (and much more reasonable).
|
||||
# See Cargo.toml.orig for the original contents.
|
||||
# If you believe there's an error in this file please file an
|
||||
# issue against the rust-lang/cargo repository. If you're
|
||||
# editing this file be aware that the upstream Cargo.toml
|
||||
# will likely look very different (and much more reasonable)
|
||||
|
||||
[package]
|
||||
edition = "2018"
|
||||
name = "sha-1"
|
||||
version = "0.10.0"
|
||||
name = "sha1"
|
||||
version = "0.10.5"
|
||||
authors = ["RustCrypto Developers"]
|
||||
description = "SHA-1 hash function"
|
||||
documentation = "https://docs.rs/sha-1"
|
||||
documentation = "https://docs.rs/sha1"
|
||||
readme = "README.md"
|
||||
keywords = ["crypto", "sha1", "hash", "digest"]
|
||||
categories = ["cryptography", "no-std"]
|
||||
|
@ -24,30 +25,28 @@ repository = "https://github.com/RustCrypto/hashes"
|
|||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[lib]
|
||||
name = "sha1"
|
||||
[dependencies.cfg-if]
|
||||
version = "1.0"
|
||||
|
||||
[dependencies.digest]
|
||||
version = "0.10"
|
||||
|
||||
[dependencies.sha1-asm]
|
||||
version = "0.5"
|
||||
optional = true
|
||||
version = "0.10.4"
|
||||
[dev-dependencies.digest]
|
||||
version = "0.10"
|
||||
version = "0.10.4"
|
||||
features = ["dev"]
|
||||
|
||||
[dev-dependencies.hex-literal]
|
||||
version = "0.2"
|
||||
version = "0.2.2"
|
||||
|
||||
[features]
|
||||
asm = ["sha1-asm"]
|
||||
compress = []
|
||||
default = ["std"]
|
||||
force-soft = []
|
||||
oid = ["digest/oid"]
|
||||
std = ["digest/std"]
|
||||
[target."cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))".dependencies.cpufeatures]
|
||||
version = "0.2"
|
||||
|
||||
[target."cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))".dependencies.sha1-asm]
|
||||
version = "0.5"
|
||||
optional = true
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{Block, BlockSizeUser, Sha1Core};
|
||||
use digest::generic_array::typenum::Unsigned;
|
||||
use digest::typenum::Unsigned;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "force-soft")] {
|
||||
|
@ -31,7 +31,6 @@ const BLOCK_SIZE: usize = <Sha1Core as BlockSizeUser>::BlockSize::USIZE;
|
|||
pub fn compress(state: &mut [u32; 5], blocks: &[Block<Sha1Core>]) {
|
||||
// SAFETY: GenericArray<u8, U64> and [u8; 64] have
|
||||
// exactly the same memory layout
|
||||
#[allow(unsafe_code)]
|
||||
let blocks: &[[u8; BLOCK_SIZE]] =
|
||||
unsafe { &*(blocks as *const _ as *const [[u8; BLOCK_SIZE]]) };
|
||||
compress_inner(state, blocks);
|
|
@ -201,6 +201,7 @@ fn sha1_digest_block_u32(state: &mut [u32; 5], block: &[u32; 16]) {
|
|||
let mut w1 = [block[4], block[5], block[6], block[7]];
|
||||
let mut w2 = [block[8], block[9], block[10], block[11]];
|
||||
let mut w3 = [block[12], block[13], block[14], block[15]];
|
||||
#[allow(clippy::needless_late_init)]
|
||||
let mut w4;
|
||||
|
||||
let mut h0 = [state[0], state[1], state[2], state[3]];
|
|
@ -1,7 +1,6 @@
|
|||
//! SHA-1 `x86`/`x86_64` backend
|
||||
|
||||
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
use core::arch::x86::*;
|
||||
|
@ -53,6 +52,7 @@ unsafe fn digest_blocks(state: &mut [u32; 5], blocks: &[[u8; 64]]) {
|
|||
let mut w1 = _mm_shuffle_epi8(_mm_loadu_si128(block_ptr.offset(1)), MASK);
|
||||
let mut w2 = _mm_shuffle_epi8(_mm_loadu_si128(block_ptr.offset(2)), MASK);
|
||||
let mut w3 = _mm_shuffle_epi8(_mm_loadu_si128(block_ptr.offset(3)), MASK);
|
||||
#[allow(clippy::needless_late_init)]
|
||||
let mut w4;
|
||||
|
||||
let mut h0 = state_abcd;
|
|
@ -29,29 +29,37 @@
|
|||
//!
|
||||
//! Also see [RustCrypto/hashes][3] readme.
|
||||
//!
|
||||
//! # Note for users of `sha1 v0.6`
|
||||
//!
|
||||
//! This crate has been transferred to the RustCrypto organization and uses
|
||||
//! implementation previously published as the `sha-1` crate. The previous
|
||||
//! zero dependencies version is now published as the [`sha1_smoll`] crate.
|
||||
//!
|
||||
//! [1]: https://en.wikipedia.org/wiki/SHA-1
|
||||
//! [2]: https://sha-mbles.github.io/
|
||||
//! [3]: https://github.com/RustCrypto/hashes
|
||||
//! [`sha1_smoll`]: https://github.com/mitsuhiko/sha1-smol/
|
||||
|
||||
#![no_std]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![doc(
|
||||
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
|
||||
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
|
||||
html_root_url = "https://docs.rs/sha-1/0.10.0"
|
||||
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
|
||||
)]
|
||||
#![warn(missing_docs, rust_2018_idioms)]
|
||||
|
||||
pub use digest::{self, Digest};
|
||||
|
||||
use core::{fmt, slice::from_ref};
|
||||
#[cfg(feature = "oid")]
|
||||
use digest::const_oid::{AssociatedOid, ObjectIdentifier};
|
||||
use digest::{
|
||||
block_buffer::Eager,
|
||||
core_api::{
|
||||
AlgorithmName, Block, BlockSizeUser, Buffer, BufferKindUser, CoreWrapper, FixedOutputCore,
|
||||
OutputSizeUser, Reset, UpdateCore,
|
||||
},
|
||||
generic_array::typenum::{Unsigned, U20, U64},
|
||||
typenum::{Unsigned, U20, U64},
|
||||
HashMarker, Output,
|
||||
};
|
||||
|
||||
|
@ -136,5 +144,11 @@ impl fmt::Debug for Sha1Core {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "oid")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "oid")))]
|
||||
impl AssociatedOid for Sha1Core {
|
||||
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.14.3.2.26");
|
||||
}
|
||||
|
||||
/// SHA-1 hasher state.
|
||||
pub type Sha1 = CoreWrapper<Sha1Core>;
|
Загрузка…
Ссылка в новой задаче