diff --git a/.github/workflows/cmpv2.yml b/.github/workflows/cmpv2.yml index c8ae46e3f..a8bfa8bc7 100644 --- a/.github/workflows/cmpv2.yml +++ b/.github/workflows/cmpv2.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cms.yml b/.github/workflows/cms.yml index b74407326..c77344685 100644 --- a/.github/workflows/cms.yml +++ b/.github/workflows/cms.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -57,7 +57,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/crmf.yml b/.github/workflows/crmf.yml index ec8b492ce..7845dcb50 100644 --- a/.github/workflows/crmf.yml +++ b/.github/workflows/crmf.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/gss-api.yml b/.github/workflows/gss-api.yml index 82ae6eb09..0ddf1e830 100644 --- a/.github/workflows/gss-api.yml +++ b/.github/workflows/gss-api.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pkcs1.yml b/.github/workflows/pkcs1.yml index 9a3bed3d0..030cd0b95 100644 --- a/.github/workflows/pkcs1.yml +++ b/.github/workflows/pkcs1.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pkcs12.yml b/.github/workflows/pkcs12.yml index 282ffdeca..ea3499655 100644 --- a/.github/workflows/pkcs12.yml +++ b/.github/workflows/pkcs12.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pkcs5.yml b/.github/workflows/pkcs5.yml index cdba00ade..8ec02177d 100644 --- a/.github/workflows/pkcs5.yml +++ b/.github/workflows/pkcs5.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pkcs8.yml b/.github/workflows/pkcs8.yml index a8d8d85d4..3e0d27a20 100644 --- a/.github/workflows/pkcs8.yml +++ b/.github/workflows/pkcs8.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -55,7 +55,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/sec1.yml b/.github/workflows/sec1.yml index c143980a4..99539d5ae 100644 --- a/.github/workflows/sec1.yml +++ b/.github/workflows/sec1.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/spki.yml b/.github/workflows/spki.yml index 9e46cc121..551bcc5b3 100644 --- a/.github/workflows/spki.yml +++ b/.github/workflows/spki.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.72.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index d9abfc4c0..bc93fe0ab 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.75.0 + toolchain: 1.81.0 components: clippy - run: cargo clippy --all --all-features --tests diff --git a/.github/workflows/x509-cert.yml b/.github/workflows/x509-cert.yml index 031a02d8a..339b09f54 100644 --- a/.github/workflows/x509-cert.yml +++ b/.github/workflows/x509-cert.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/x509-ocsp.yml b/.github/workflows/x509-ocsp.yml index 19c33d7c8..2878dfa1b 100644 --- a/.github/workflows/x509-ocsp.yml +++ b/.github/workflows/x509-ocsp.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/x509-tsp.yml b/.github/workflows/x509-tsp.yml index 6692d5f3f..ac8ead53f 100644 --- a/.github/workflows/x509-tsp.yml +++ b/.github/workflows/x509-tsp.yml @@ -29,7 +29,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -54,7 +54,7 @@ jobs: strategy: matrix: rust: - - 1.75.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 37f441df1..b4792c8a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -828,9 +828,9 @@ dependencies = [ [[package]] name = "hybrid-array" -version = "0.2.0-rc.9" +version = "0.2.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d306b679262030ad8813a82d4915fc04efff97776e4db7f8eb5137039d56400" +checksum = "bae36f8710514b3e7aab028021733330de6e455e0352e19c6dd4513eecb7aa9a" dependencies = [ "typenum", "zeroize", diff --git a/cmpv2/Cargo.toml b/cmpv2/Cargo.toml index b01b46e79..9445fded3 100644 --- a/cmpv2/Cargo.toml +++ b/cmpv2/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] crmf = "=0.3.0-pre" diff --git a/cms/Cargo.toml b/cms/Cargo.toml index eed22cb25..da44ae7e6 100644 --- a/cms/Cargo.toml +++ b/cms/Cargo.toml @@ -12,7 +12,7 @@ categories = ["cryptography", "encoding", "no-std", "parser-implementations"] keywords = ["crypto", "pkcs7", "signing"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["alloc", "derive", "oid", "pem"] } diff --git a/crmf/Cargo.toml b/crmf/Cargo.toml index af96b18c1..3ad1e04e7 100644 --- a/crmf/Cargo.toml +++ b/crmf/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] cms = "=0.3.0-pre" diff --git a/der/src/asn1/integer/int.rs b/der/src/asn1/integer/int.rs index 1142d576d..91f40567e 100644 --- a/der/src/asn1/integer/int.rs +++ b/der/src/asn1/integer/int.rs @@ -30,6 +30,8 @@ macro_rules! impl_encoding_traits { let bytes = reader.read_into(&mut buf[..max_length])?; + // We actually want the conversion to overflow here + #[allow(clippy::cast_possible_wrap)] let result = if is_highest_bit_set(bytes) { <$uint>::from_be_bytes(decode_to_array(bytes)?) as $int } else { @@ -48,6 +50,8 @@ macro_rules! impl_encoding_traits { impl EncodeValue for $int { fn value_len(&self) -> Result { if *self < 0 { + // We actually want the conversion to overflow here + #[allow(clippy::cast_sign_loss)] negative_encoded_len(&(*self as $uint).to_be_bytes()) } else { uint::encoded_len(&self.to_be_bytes()) @@ -56,6 +60,8 @@ macro_rules! impl_encoding_traits { fn encode_value(&self, writer: &mut impl Writer) -> Result<()> { if *self < 0 { + // We actually want the conversion to overflow here + #[allow(clippy::cast_sign_loss)] encode_bytes(writer, &(*self as $uint).to_be_bytes()) } else { uint::encode_bytes(writer, &self.to_be_bytes()) diff --git a/gss-api/Cargo.toml b/gss-api/Cargo.toml index 5a343f8d5..60f04a5a4 100644 --- a/gss-api/Cargo.toml +++ b/gss-api/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "authentication", "encoding", "no-std", "parser-im keywords = ["crypto", "gssapi", "kerberos", "krb5"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["oid", "alloc"] } diff --git a/pkcs1/Cargo.toml b/pkcs1/Cargo.toml index 43b1f6ebe..eb60e48d9 100644 --- a/pkcs1/Cargo.toml +++ b/pkcs1/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std", "parser-i keywords = ["crypto", "key", "pem", "pkcs", "rsa"] readme = "README.md" edition = "2021" -rust-version = "1.72" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["oid"] } diff --git a/pkcs12/Cargo.toml b/pkcs12/Cargo.toml index 3821193bc..28c12df56 100644 --- a/pkcs12/Cargo.toml +++ b/pkcs12/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "encoding", "no-std", "parser-implementations"] keywords = ["crypto", "key", "pkcs", "private"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["alloc", "derive", "oid", "pem"] } diff --git a/pkcs5/Cargo.toml b/pkcs5/Cargo.toml index d6c009fda..98bfca76c 100644 --- a/pkcs5/Cargo.toml +++ b/pkcs5/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto", "key", "pkcs", "password"] readme = "README.md" edition = "2021" -rust-version = "1.72" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["oid"] } diff --git a/pkcs8/Cargo.toml b/pkcs8/Cargo.toml index 77fc1f2a9..56cb3d629 100644 --- a/pkcs8/Cargo.toml +++ b/pkcs8/Cargo.toml @@ -14,7 +14,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std", "parser-i keywords = ["crypto", "key", "pkcs", "private"] readme = "README.md" edition = "2021" -rust-version = "1.72" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["oid"] } diff --git a/sec1/Cargo.toml b/sec1/Cargo.toml index 2d5e81b70..b14c071e5 100644 --- a/sec1/Cargo.toml +++ b/sec1/Cargo.toml @@ -14,12 +14,12 @@ categories = ["cryptography", "data-structures", "encoding", "no-std", "parser-i keywords = ["crypto", "key", "elliptic-curve", "secg"] readme = "README.md" edition = "2021" -rust-version = "1.72" +rust-version = "1.81" [dependencies] base16ct = { version = "0.2", optional = true, default-features = false } der = { version = "0.8.0-rc.0", optional = true, features = ["oid"] } -hybrid-array = { version = "0.2.0-rc.9", optional = true, default-features = false } +hybrid-array = { version = "0.2.0-rc.10", optional = true, default-features = false } pkcs8 = { version = "0.11.0-rc.1", optional = true, default-features = false } serdect = { version = "0.3.0-rc.0", optional = true, default-features = false, features = ["alloc"] } subtle = { version = "2", optional = true, default-features = false } diff --git a/spki/Cargo.toml b/spki/Cargo.toml index 77e2703d8..69bc2e1b0 100644 --- a/spki/Cargo.toml +++ b/spki/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto", "x509"] readme = "README.md" edition = "2021" -rust-version = "1.72" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["oid"] } diff --git a/tls_codec/derive/tests/decode_bytes.rs b/tls_codec/derive/tests/decode_bytes.rs index c08ce3be8..2c42f0638 100644 --- a/tls_codec/derive/tests/decode_bytes.rs +++ b/tls_codec/derive/tests/decode_bytes.rs @@ -240,9 +240,9 @@ fn enum_with_custom_serialized_field() { #[test] fn that_skip_attribute_on_struct_works() { - fn test(test: T, expected: T) + fn test(test: T, expected: T) where - T: std::fmt::Debug + PartialEq + SerializeBytes + Size, + T: DeserializeBytes + std::fmt::Debug + PartialEq + SerializeBytes + Size, { let serialized = test.tls_serialize().unwrap(); let (deserialized, rest) = T::tls_deserialize_bytes(&serialized).unwrap(); diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index 19366942f..805000ea1 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] const-oid = { version = "0.10.0-rc.0", features = ["db"] } diff --git a/x509-cert/src/builder.rs b/x509-cert/src/builder.rs index d86946257..71f2b97a6 100644 --- a/x509-cert/src/builder.rs +++ b/x509-cert/src/builder.rs @@ -461,12 +461,12 @@ pub trait AsyncBuilder: Sized { S::VerifyingKey: EncodePublicKey; /// Run the object through the signer and build it. - async fn build_async(mut self, signer: &S) -> Result + async fn build_async(mut self, signer: &S) -> Result where S: AsyncSigner, S: Keypair + DynSignatureAlgorithmIdentifier, S::VerifyingKey: EncodePublicKey, - Signature: SignatureBitStringEncoding, + Signature: SignatureBitStringEncoding + 'static, { let blob = self.finalize(signer)?; @@ -476,7 +476,7 @@ pub trait AsyncBuilder: Sized { } /// Run the object through the signer and build it. - async fn build_with_rng_async( + async fn build_with_rng_async( mut self, signer: &S, rng: &mut impl CryptoRngCore, @@ -485,7 +485,7 @@ pub trait AsyncBuilder: Sized { S: AsyncRandomizedSigner, S: Keypair + DynSignatureAlgorithmIdentifier, S::VerifyingKey: EncodePublicKey, - Signature: SignatureBitStringEncoding, + Signature: SignatureBitStringEncoding + 'static, { let blob = self.finalize(signer)?; diff --git a/x509-cert/src/ext/pkix/sct.rs b/x509-cert/src/ext/pkix/sct.rs index f03b71ff5..f62cc9864 100644 --- a/x509-cert/src/ext/pkix/sct.rs +++ b/x509-cert/src/ext/pkix/sct.rs @@ -3,8 +3,6 @@ //! //! [Certificate Transparency RFC 6962]: https://datatracker.ietf.org/doc/html/rfc6962 -#![cfg(feature = "sct")] - use alloc::{format, vec::Vec}; use const_oid::{db::rfc6962::CT_PRECERT_SCTS, AssociatedOid, ObjectIdentifier}; use der::asn1::OctetString; diff --git a/x509-cert/tests/name.rs b/x509-cert/tests/name.rs index 8a455370d..7daec5a30 100644 --- a/x509-cert/tests/name.rs +++ b/x509-cert/tests/name.rs @@ -321,7 +321,7 @@ fn rdns_serde() { "1.3.6.1.4.1.1466.0=#04024869", &[&[AttributeTypeAndValue { oid: ObjectIdentifier::new("1.3.6.1.4.1.1466.0").unwrap(), - value: Any::from(OctetStringRef::new(&[b'H', b'i']).unwrap()), + value: Any::from(OctetStringRef::new(b"Hi").unwrap()), }]], ), ]; diff --git a/x509-ocsp/Cargo.toml b/x509-ocsp/Cargo.toml index ffa4ab262..55cf221ae 100644 --- a/x509-ocsp/Cargo.toml +++ b/x509-ocsp/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std"] keywords = ["crypto", "x509"] readme = "README.md" edition = "2021" -rust-version = "1.75" +rust-version = "1.81" [dependencies] const-oid = { version = "0.10.0-rc.0", default-features = false, features = ["db"] } diff --git a/x509-tsp/Cargo.toml b/x509-tsp/Cargo.toml index e57615fcd..a84557d0c 100644 --- a/x509-tsp/Cargo.toml +++ b/x509-tsp/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/RustCrypto/formats" categories = ["cryptography", "encoding", "no-std", "parser-implementations"] keywords = ["crypto", "tsp", "timestamp"] readme = "README.md" -rust-version = "1.75" +rust-version = "1.81" [dependencies] der = { version = "0.8.0-rc.0", features = ["alloc", "derive", "oid", "pem"] }