commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
4a86dbd0c50930149c3f618cd18ed1b7b76eba9a
Tony Arcieri
2025-07-03T02:52:41
der: improve efficiency of indefinite length reader (#1900)
diff --git a/der/src/bytes_owned.rs b/der/src/bytes_owned.rs index 6216d803..e4e68c2b 100644 --- a/der/src/bytes_owned.rs +++ b/der/src/bytes_owned.rs @@ -69,6 +69,7 @@ impl<'a> DecodeValue<'a> for BytesOwned { // Parse constructed indefinite length data // TODO(tarcieri): extract this somewhe...
1
6
3
bf9fec9015a377a6fb5749e37ae49474b4b98fc6
Tony Arcieri
2025-07-03T02:13:08
der: constructed `OctetString` support (#1899) Converts `OctetString` to use `BytesOwned` internally and adds an initial decoder for constructed indefinite length data to `BytesOwned`. This should be reusable for other constructed string types as well, although they'll need to receive a similar treatment.
diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index 4e862eb0..125df229 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -159,11 +159,10 @@ pub use self::allocating::OctetString; #[cfg(feature = "alloc")] mod allocating { use super::*; - use crate::refe...
4
71
25
ace601cbc842a01eeb8aab8b5089e66a0d7ed004
Tony Arcieri
2025-07-03T00:41:38
cms: expand BER tests (#1898) Adds some small fixups to `Any` to make it possible to parse BER encoded messages
diff --git a/cms/tests/tests_from_pkcs7_crate.rs b/cms/tests/tests_from_pkcs7_crate.rs index bcd5c672..493555ed 100644 --- a/cms/tests/tests_from_pkcs7_crate.rs +++ b/cms/tests/tests_from_pkcs7_crate.rs @@ -1,9 +1,10 @@ -use cms::content_info::{CmsVersion, ContentInfo}; -use cms::encrypted_data::EncryptedData; -use cms...
2
66
21
13501af26aab873f96fccc2199a073bf6444dffa
Tony Arcieri
2025-07-02T23:30:32
der: have `read_value` pass through header sans EOC (#1897) Changes `read_value`'s callback to accept a `Header` argument which includes the indefinite length without the trailing EOC marker. Otherwise indefinite length decoders will run into the EOC marker.
diff --git a/der/src/asn1/internal_macros.rs b/der/src/asn1/internal_macros.rs index 89adc9c8..5b88c272 100644 --- a/der/src/asn1/internal_macros.rs +++ b/der/src/asn1/internal_macros.rs @@ -152,10 +152,7 @@ macro_rules! impl_custom_class { } // read_value checks if header matches de...
3
8
10
ae360613d69cf1c7f2c7c6b6e75647cec44b7615
Tony Arcieri
2025-07-02T22:07:33
der: (re-)add `Reader::read_value` with EOC support (#1895) One of the blockers for addressing indefinite length handling (#779) has been where to consume the EOC tag. This commit (re)introduces `Reader::read_value` (added in #1877, removed in #1887) and handles decoding the EOC there. This gives us a single place wh...
diff --git a/cms/tests/tests_from_pkcs7_crate.rs b/cms/tests/tests_from_pkcs7_crate.rs index e422b141..bcd5c672 100644 --- a/cms/tests/tests_from_pkcs7_crate.rs +++ b/cms/tests/tests_from_pkcs7_crate.rs @@ -141,3 +141,14 @@ fn cms_decode_signed_der() { // should match the original assert_eq!(reencoded_der_sig...
5
80
28
b288a6186531203c97ecda5791adb1f70f086993
Tony Arcieri
2025-07-02T19:34:06
der: add `indefinite` flag to `Length` (#1894) Tracks whether decoded lengths were `indefinite`, which is needed to decide how to decode the field's value. Also adds a check that the constructed bit is set when an indefinite length is encountered in a `Header`.
diff --git a/der/src/header.rs b/der/src/header.rs index 58cbe40a..22a6df05 100644 --- a/der/src/header.rs +++ b/der/src/header.rs @@ -1,6 +1,8 @@ //! ASN.1 DER headers. -use crate::{Decode, DerOrd, Encode, Error, ErrorKind, Length, Reader, Result, Tag, Writer}; +use crate::{ + Decode, DerOrd, Encode, EncodingRul...
5
90
41
ddff26dbd5948c824fb08e23c80908b135028c58
Tony Arcieri
2025-06-22T13:32:28
Cargo.toml: remove branches from `patch.crates-io` (#1890) The relevant branches have been merged
diff --git a/Cargo.lock b/Cargo.lock index dce2c572..7ebdeae4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.17.0-rc.3" -source = "git+https://github.com/RustCrypto/signatures.git?branch=der-error-fixups#80909c41ef37718c7f2dfb3b8cd6c828b907f1e6" ...
3
8
10
4cb99df01f32ecc51f036de5d71a42d84cb6f499
Tony Arcieri
2025-06-22T03:01:20
der: error position tracking improvements (#1889) - Changes all `Tag::*_error` methods to return `ErrorKind` rather than `Error`, and changes call sites where these methods were used with a `Reader` in scope to call `reader.error()` to ensure error position is propagated appropriately. - Locates sites of `ErrorK...
diff --git a/Cargo.lock b/Cargo.lock index 0f23ac1d..dce2c572 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,8 +523,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.17.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "908741ea702207ae9456173adf9aaa8fffdd3a057e55ca9...
36
127
114
5277fcfa0a30fbf9089bcd1222e348414d3e1b1b
Tony Arcieri
2025-06-21T16:57:06
der: remove `Reader::read_value` (#1887) This was added in #1877 but the real value of that PR was the automatic `read_nested` on `DecodeValue` impls. `Reader::read_value` isn't actually necessary for that at all. It may be useful in the future if we introduce a BER reader that can handle decoding constructed e.g. st...
diff --git a/der/src/asn1/internal_macros.rs b/der/src/asn1/internal_macros.rs index ec1a4872..aeea1b2f 100644 --- a/der/src/asn1/internal_macros.rs +++ b/der/src/asn1/internal_macros.rs @@ -151,8 +151,8 @@ macro_rules! impl_custom_class { return Err(header.tag.non_canonical_error().into()); ...
3
5
17
0f4ce04f12e7104db9abc1bb67a5a02d344994fa
Tony Arcieri
2025-06-21T16:39:41
der: simplify `Header::peek` and `Tag::peek` (#1886) We can rely on the ability to clone the `Reader` to use the `Decode` implementation to implement peeking, so we don't need a separate bespoke implementation. This also avoids losing the `Reader` context while peeking.
diff --git a/der/src/asn1/optional.rs b/der/src/asn1/optional.rs index 5ad8a210..b0063fbc 100644 --- a/der/src/asn1/optional.rs +++ b/der/src/asn1/optional.rs @@ -10,10 +10,12 @@ where type Error = T::Error; fn decode<R: Reader<'a>>(reader: &mut R) -> Result<Option<T>, Self::Error> { - if let Some(ta...
3
12
49
65b5d4c2d126eecffba33e03ee4c31ce4105392c
Tony Arcieri
2025-06-21T15:39:51
der: remove EOC bytes from decoded indefinite lengths (#1885) The bytes `00 00` are used as a marker that we've reached the end of an indefinite length field, and are not of interest to someone who wants the actual value contained in the field.
diff --git a/der/src/length.rs b/der/src/length.rs index 16ef3238..961e5869 100644 --- a/der/src/length.rs +++ b/der/src/length.rs @@ -1,8 +1,8 @@ //! Length calculations for encoded ASN.1 DER values use crate::{ - Decode, DerOrd, Encode, EncodingRules, Error, ErrorKind, Reader, Result, SliceWriter, Tag, - Wr...
2
47
8
1d596fc41a237d5a0606fbe1eaab6fa7227eab49
Tony Arcieri
2025-06-21T14:04:57
der: preliminary indefinite length support (#1884) Adds initial support to the `Length` type for decoding indefinite lengths when `EncodingRules::Ber` are in use. Note that this only adds the needed support to the `Length` type and handling of the constructed form of various universal tags (which may require a specia...
diff --git a/der/src/error.rs b/der/src/error.rs index 9087f74d..71f0f729 100644 --- a/der/src/error.rs +++ b/der/src/error.rs @@ -198,7 +198,7 @@ pub enum ErrorKind { #[cfg(feature = "std")] Io(std::io::ErrorKind), - /// Indefinite length disallowed. + /// Indefinite length disallowed (or malformed w...
3
126
9
dd8dbfa4cbc6fa34da72de55773ffddac93661fa
Tony Arcieri
2025-06-21T04:55:02
der: make `Reader` cloneable (#1883) Alternative to #1882 which makes arbitrary peeking possible by directly cloning the `Reader`, rather than providing a facade which clones it for you. This also makes `Reader::peek_into` a provided method.
diff --git a/der/src/reader.rs b/der/src/reader.rs index a57e290d..38456eee 100644 --- a/der/src/reader.rs +++ b/der/src/reader.rs @@ -16,19 +16,13 @@ use crate::{ use alloc::vec::Vec; /// Reader trait which reads DER-encoded input. -pub trait Reader<'r>: Sized { +pub trait Reader<'r>: Clone { /// Get the [`En...
3
11
17
5806c27721f7d8b5c2e86a00c9084c9ba7fd4f88
Tony Arcieri
2025-06-21T02:41:09
Bump `crypto-bigint` to v0.7.0-pre.5 (#1881) Also bumps: `ecdsa`, `rsa`, `p256`
diff --git a/Cargo.lock b/Cargo.lock index 1647da22..0f23ac1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -411,9 +411,9 @@ checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-bigint" -version = "0.7.0-pre.4" +version = "0.7.0-pre.5" source = "registry+https://gi...
4
23
23
3eb8f1678e342c71f169209a106daf58daa25258
Tony Arcieri
2025-06-21T01:24:45
der: extract `reader::position::Position` (#1880) Extracts a state management struct for nested position tracking. The goal is to support nested message parsing keeping track of where we are in the message using only the call stack, i.e. without the need to keep such information on the heap, as this crate is intended...
diff --git a/der/src/reader.rs b/der/src/reader.rs index 845bb8c1..a57e290d 100644 --- a/der/src/reader.rs +++ b/der/src/reader.rs @@ -4,6 +4,9 @@ pub(crate) mod pem; pub(crate) mod slice; +#[cfg(feature = "pem")] +mod position; + use crate::{ Decode, DecodeValue, Encode, EncodingRules, Error, ErrorKind, Fixe...
3
169
35
db6172addf4cdfe019f402aaa9dc6d7f113cde7f
Tony Arcieri
2025-06-20T21:16:31
der v0.8.0-rc.5 (#1878)
diff --git a/Cargo.lock b/Cargo.lock index a053190e..1647da22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "der" -version = "0.8.0-rc.4" +version = "0.8.0-rc.5" dependencies = [ "arbitrary", "bytes", diff --git a/der/Cargo.toml b/der/Cargo.toml index 092b9d7e...
2
2
2
e511cf1793f526c4d4fc2ca65317afdc6d823d91
Tony Arcieri
2025-06-20T21:16:20
base64ct: fix `nightly` clippy warning (#1879)
diff --git a/base64ct/src/encoder.rs b/base64ct/src/encoder.rs index 7fccf0df..873fc56a 100644 --- a/base64ct/src/encoder.rs +++ b/base64ct/src/encoder.rs @@ -279,7 +279,7 @@ impl LineWrapper { .ok_or(InvalidLength)?; // The `wrap_blocks` function should ensure the buffer is no larger than a Bas...
1
1
1
2e80d5871d0ec3d431124dfd6bd8cfc8f02aab66
Tony Arcieri
2025-06-20T20:32:37
der: add `Reader::read_value`, auto-nest `DecodeValue` (#1877) Previously `der` lacked an abstraction for automatically setting up nested readers when decoding values, so every `DecodeValue` impl ended up handling its own nesting. This adds a new provided method to the `Reader` trait which automatically handles nesti...
diff --git a/der/src/asn1/internal_macros.rs b/der/src/asn1/internal_macros.rs index aeea1b2f..ec1a4872 100644 --- a/der/src/asn1/internal_macros.rs +++ b/der/src/asn1/internal_macros.rs @@ -151,8 +151,8 @@ macro_rules! impl_custom_class { return Err(header.tag.non_canonical_error().into()); ...
18
227
256
b979c542310d0cd74adcee1fbbbb50376becffd9
Tony Arcieri
2025-06-20T19:32:59
der: add `diagnostic::on_unimplemented` attributes (#1876) Adds some `note` attributes to help people figure out blanket impls where applicable
diff --git a/der/src/decode.rs b/der/src/decode.rs index f3bb878c..451de1e2 100644 --- a/der/src/decode.rs +++ b/der/src/decode.rs @@ -16,6 +16,9 @@ use alloc::boxed::Box; /// /// This trait provides the core abstraction upon which all decoding operations /// are based. +#[diagnostic::on_unimplemented( + note = "...
3
17
0
1f988ac744dc138a80b67cb1ce59fed7b513cc4b
Arthur Gautier
2025-06-16T22:53:43
workspace: bump dependencies (#1873) This bumps: - `elliptic-curve` from `0.14.0-rc.5` to `0.14.0-rc.6` - `ecdsa` from `0.17.0-rc.1` to `0.17.0-rc.2`
diff --git a/Cargo.lock b/Cargo.lock index ed1fad16..a053190e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.1" +version = "0.17.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca18d8009d96ffc2a8b...
3
12
12
c17884dc2e8acec121d9e1f22ab2ffd98eed1497
Arthur Gautier
2025-06-13T16:19:22
x509-cert: expose profile in the CrlBuilder (#1870) Entries in a CRL may not comply fully with RFC5280 and the builder should not put undue bounds on the serial numbers.
diff --git a/x509-cert/src/builder.rs b/x509-cert/src/builder.rs index f993d9d0..18123458 100644 --- a/x509-cert/src/builder.rs +++ b/x509-cert/src/builder.rs @@ -12,7 +12,7 @@ use spki::{ use crate::{ AlgorithmIdentifier, SubjectPublicKeyInfo, - certificate::{Certificate, TbsCertificate, Version}, + cert...
2
20
10
abf73ebfd1574839574f14340585c85566ce6074
Arthur Gautier
2025-06-10T06:03:17
x509-cert: implement Ord for CrlReason (#1869)
diff --git a/x509-cert/src/ext/pkix/crl.rs b/x509-cert/src/ext/pkix/crl.rs index 33013e33..5f9ad05a 100644 --- a/x509-cert/src/ext/pkix/crl.rs +++ b/x509-cert/src/ext/pkix/crl.rs @@ -115,7 +115,7 @@ impl_extension!(FreshestCrl, critical = false); /// ``` /// /// [RFC 5280 Section 5.3.1]: https://datatracker.ietf.org...
1
1
1
759ce59f637b38dfd560fd6cbc6f29995e7703a5
Arthur Gautier
2025-06-10T01:05:55
x509-cert: allow serialnumbers to be stored in a database (#1868) When storing serialnumbers in a database, a btree or similar structure, the serial number could be required to implement Ord. This is useful for a CRL database for example. This is only possible if the Profile itself implements Ord. As this is a very c...
diff --git a/x509-cert/src/certificate.rs b/x509-cert/src/certificate.rs index 49e1acb2..83647721 100644 --- a/x509-cert/src/certificate.rs +++ b/x509-cert/src/certificate.rs @@ -25,7 +25,7 @@ use crate::time::Time; /// [`Profile`] allows the consumer of this crate to customize the behavior when parsing /// certifica...
1
3
3
5342b9a83eab7390e1a23e9df71455ba673e705d
Arthur Gautier
2025-06-09T20:49:54
workspace: update dependencies (#1867) ``` Updating anstyle v1.0.10 -> v1.0.11 Unchanged bincode v1.3.3 (available: v2.0.1) Updating bitflags v2.9.0 -> v2.9.1 Updating clap v4.5.35 -> v4.5.40 Updating clap_builder v4.5.35 -> v4.5.40 Updating clap_lex v0.7.4 -> v0.7.5 Updating errno v0.3.11 -> v0.3.12 Removing getrando...
diff --git a/Cargo.lock b/Cargo.lock index 0f27697c..ed1fad16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98ae...
1
75
122
06525e8bf9eaa55f07d613a3d906d1ddc86ef39b
Arthur Gautier
2025-06-09T06:17:00
x509-cert: v0.3.0-rc.0 Fixup 37ae27c742737d33219f13394f6f433816eb1413 where version was 0.3.0-rc.1 and not rc.0
diff --git a/Cargo.lock b/Cargo.lock index cc95db69..0f27697c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1901,7 +1901,7 @@ dependencies = [ [[package]] name = "x509-cert" -version = "0.3.0-rc.1" +version = "0.3.0-rc.0" dependencies = [ "arbitrary", "const-oid", diff --git a/x509-cert/Cargo.toml b/x509-cert/C...
2
2
2
37ae27c742737d33219f13394f6f433816eb1413
Arthur Gautier
2025-06-09T06:15:02
x509-cert: 0.3.0-rc.0 (#1861)
diff --git a/Cargo.lock b/Cargo.lock index e7dae09b..cc95db69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -543,8 +543,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" -version = "0.14.0-rc.4" -source = "git+https://github.com/RustCrypto/traits.gi...
10
22
28
4c6256c5209392fcb24b1df79c3c1c5445a16d0c
Arthur Gautier
2025-06-05T22:18:04
der: v0.8.0-rc.4 (#1863)
diff --git a/Cargo.lock b/Cargo.lock index 996bfa9d..95ee9a08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "der" -version = "0.8.0-rc.3" +version = "0.8.0-rc.4" dependencies = [ "arbitrary", "bytes", diff --git a/der/Cargo.toml b/der/Cargo.toml index 8203939f...
2
2
2
f64b057a723f39bb33a8bc311c4c37c6f15a2733
Arthur Gautier
2025-06-05T21:07:11
x509-tsp: cleanup residual Cargo.lock (#1862)
diff --git a/x509-tsp/Cargo.lock b/x509-tsp/Cargo.lock deleted file mode 100644 index 7de5cc5e..00000000 --- a/x509-tsp/Cargo.lock +++ /dev/null @@ -1,169 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "base64ct" -version = "1.6.0...
1
0
169
19ce47500b87e1fc245c109071acbe035b129e24
Arthur Gautier
2025-06-03T03:21:57
reunite workspace (#1856) Fixes #1848 which did not remove the workspace.excludes
diff --git a/Cargo.toml b/Cargo.toml index 55586702..85cc8f14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,16 +27,6 @@ members = [ "x509-cert/test-support", "x509-ocsp" ] -exclude = [ - "cmpv2", - "cms", - "crmf", - "gss-api", - "x509-tsp", - "x509-cert", - "x509-cert/test-support", -...
1
0
10
705400abbc86ae9be41d130ab46afad9acaa7c81
dishmaker
2025-06-02T21:53:21
der: support `Cow<[u8]>` in derive(Sequence) (#1850)
diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index 8813407f..72023bbe 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -160,6 +160,7 @@ pub use self::allocating::OctetString; mod allocating { use super::*; use crate::referenced::*; + use alloc::bo...
1
17
0
d4395cdb10f3b7ecfb2ccba4d3dd29e74f576576
dishmaker
2025-06-02T13:51:26
der: make `ObjectIdentifier<MAX_SIZE>` impls generic (#1851)
diff --git a/der/src/asn1/oid.rs b/der/src/asn1/oid.rs index 3b0e5050..fbfa71e6 100644 --- a/der/src/asn1/oid.rs +++ b/der/src/asn1/oid.rs @@ -4,27 +4,27 @@ use crate::{ DecodeValue, EncodeValue, Error, FixedTag, Header, Length, Reader, Result, Tag, Tagged, Writer, asn1::AnyRef, ord::OrdIsValueOrd, }; -use c...
2
15
15
6d28e0070654dea80b2e0dd019dbc232340b1fa5
dishmaker
2025-06-02T13:36:38
const-oid: add constructor from_bytes for `ObjectIdentifier<MAX_SIZE>` (#1852)
diff --git a/const-oid/src/lib.rs b/const-oid/src/lib.rs index b50245ee..d881280e 100644 --- a/const-oid/src/lib.rs +++ b/const-oid/src/lib.rs @@ -119,11 +119,18 @@ impl ObjectIdentifier { /// Parse an OID from from its BER/DER encoding. pub fn from_bytes(ber_bytes: &[u8]) -> Result<Self> { - ObjectI...
1
8
1
48a2f2bc433b665a51c0aeb5bde15c341038553e
Arthur Gautier
2025-05-30T23:27:51
pkcs1+pkcs5+pkcs8+sec1+spki: rc releases (#1847) * pkcs1+pkcs5+pkcs8+sec1+spki: rc releases - `pkcs1` 0.8.0-rc.2 - `pkcs5` 0.8.0-rc.4 - `pkcs8` 0.11.0-rc.4 - `sec1` 0.8.0-rc.5 - `spki` 0.8.0-rc.2
diff --git a/Cargo.lock b/Cargo.lock index 5f71a0df..a3c321a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,25 +2,11 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56...
19
128
678
0d763fcfda55e20c0e0680877cdf9a57d40c7c0e
Arthur Gautier
2025-05-30T20:02:10
der+der_derive+pem: rc releases (#1846) - `der_derive` 0.8.0-rc.3 - `der` 0.8.0-rc.3 - `pem-rfc7468` 1.0.0-rc.3
diff --git a/Cargo.lock b/Cargo.lock index 588f5aa1..5f71a0df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -451,7 +451,7 @@ dependencies = [ [[package]] name = "der" -version = "0.8.0-rc.2" +version = "0.8.0-rc.3" dependencies = [ "arbitrary", "bytes", @@ -468,7 +468,7 @@ dependencies = [ [[package]] name =...
4
8
8
3b0fcbae1f47b26d0be5b210ae6585455e9663c6
Arthur Gautier
2025-05-27T19:56:07
reunite workspace after digest bump (#1845)
diff --git a/Cargo.lock b/Cargo.lock index 0d0c3be7..588f5aa1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a...
2
538
78
070aa2ced20ca2b6a361326e20756060faae894a
heliannuuthus
2025-05-20T13:38:46
base16ct: use core::error:Error (#1842)
diff --git a/base16ct/src/error.rs b/base16ct/src/error.rs index 45717bc3..bce5bd5e 100644 --- a/base16ct/src/error.rs +++ b/base16ct/src/error.rs @@ -22,8 +22,7 @@ impl fmt::Display for Error { } } -#[cfg(feature = "std")] -impl std::error::Error for Error {} +impl core::error::Error for Error {} impl From<...
1
1
2
583ab500b0931196a361bbe52c2c781a326218b3
Tony Arcieri
2025-05-18T00:09:19
der: simplify `From<&UintRef<'a>>` for `Uint` (#1840)
diff --git a/der/src/asn1/integer/uint.rs b/der/src/asn1/integer/uint.rs index d4ff6f0d..caf0e151 100644 --- a/der/src/asn1/integer/uint.rs +++ b/der/src/asn1/integer/uint.rs @@ -245,8 +245,9 @@ mod allocating { impl<'a> From<&UintRef<'a>> for Uint { fn from(value: &UintRef<'a>) -> Uint { - l...
1
3
2
551a8aaa872c11fe2e5367ef2b78a593b7c1e7f8
dishmaker
2025-05-12T15:57:54
der: fix panic in `value_cmp`: add `Iterator::size_hint` + tests (#1830) * der: add test for `SetOf::value_cmp` * der: fix `Iterator::size_hint` * der: add test bitstring_valueord_value_cmp
diff --git a/der/src/asn1/bit_string.rs b/der/src/asn1/bit_string.rs index 1104d2bf..488229b9 100644 --- a/der/src/asn1/bit_string.rs +++ b/der/src/asn1/bit_string.rs @@ -472,6 +472,11 @@ impl Iterator for BitStringIter<'_> { self.position = self.position.checked_add(1)?; Some(byte & bit != 0) } ...
3
61
1
2f3e06651769300f8ffa2e04d887e4c8ab7ed16a
dishmaker
2025-05-12T15:55:02
crmf: fix infinite recursion in `EncKeyWithIdChoice::tag` (#1832)
diff --git a/crmf/src/pop.rs b/crmf/src/pop.rs index 14fe4dc9..dd8f0e97 100644 --- a/crmf/src/pop.rs +++ b/crmf/src/pop.rs @@ -266,7 +266,7 @@ impl<'a> ::der::Tagged for EncKeyWithIdChoice<'a> { fn tag(&self) -> ::der::Tag { match self { Self::String(_) => <Utf8StringRef<'a> as ::der::FixedTa...
1
24
1
635f3f29ba917d1793ec122615b1eaa953fb8a34
dishmaker
2025-05-11T13:20:42
der: test `Null` decode invalid length (#1831)
diff --git a/der/src/asn1/null.rs b/der/src/asn1/null.rs index 0fabdfc8..a0eff731 100644 --- a/der/src/asn1/null.rs +++ b/der/src/asn1/null.rs @@ -103,5 +103,6 @@ mod tests { #[test] fn reject_non_canonical() { assert!(Null::from_der(&[0x05, 0x81, 0x00]).is_err()); + assert!(Null::from_der(&[0...
1
1
0
545415df71f1df16a45b55f3d64edb2524079b07
dishmaker
2025-05-11T13:16:14
der: fix `Header::peek` + add tests (#1828)
diff --git a/der/src/header.rs b/der/src/header.rs index 4a2bfbf2..0964174f 100644 --- a/der/src/header.rs +++ b/der/src/header.rs @@ -33,14 +33,13 @@ impl Header { for i in 2..Self::MAX_SIZE { let slice = &mut buf[0..i]; - if reader.peek_into(slice).is_ok() { - if let ...
3
58
13
57acffd7e195ff352a76d0ce274c055a6f94c70e
dishmaker
2025-05-10T14:49:12
der_derive: decode_value_inner `#[doc(hidden)]` (#1827)
diff --git a/der_derive/src/sequence.rs b/der_derive/src/sequence.rs index da11efff..5963d0ab 100644 --- a/der_derive/src/sequence.rs +++ b/der_derive/src/sequence.rs @@ -105,6 +105,7 @@ impl DeriveSequence { quote! { impl #impl_generics #ident #ty_generics #where_clause { + #[doc...
1
1
0
6b61d0f2dc509f92e59cb826180ca9111ebe0d81
dishmaker
2025-05-10T04:37:59
der: add derive support for `APPLICATION` and `PRIVATE` tags (#1825) * der_derive: draft of custom classes * der_derive: refactor to use ClassNum * der: derive: add application tag test * der: actually use application and private tags * der: cargo clippy * der: comment use of FixedTag * der: fix typo
diff --git a/der/tests/derive.rs b/der/tests/derive.rs index 03c02bab..fe854a78 100644 --- a/der/tests/derive.rs +++ b/der/tests/derive.rs @@ -787,6 +787,140 @@ mod decode_encode_value { } } +#[cfg(all(feature = "derive", feature = "oid"))] +mod custom_application { + use const_oid::ObjectIdentifier; + us...
7
466
128
aeee92c272656127ad16c8636220dae40fb8868f
Tobias Hommel
2025-05-09T13:25:54
cmpv2: make `PkiFailureInfoValues` a `u32`; fix `BadTime` variant (#1824)
diff --git a/cmpv2/src/status.rs b/cmpv2/src/status.rs index ad50960a..f78bef66 100644 --- a/cmpv2/src/status.rs +++ b/cmpv2/src/status.rs @@ -122,11 +122,11 @@ flags! { /// /// [RFC 4210 Section 5.2.3]: https://www.rfc-editor.org/rfc/rfc4210#section-5.2.3 #[allow(missing_docs)] - pub enum PkiFailureI...
1
2
2
a9b80c633b70bf4949f26ac295fb482da8102118
dishmaker
2025-05-08T14:04:40
der: add macro for `APPLICATION`, `CONTEXT-SPECIFIC` and `PRIVATE` tags (#1819)
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 22cc4d0a..60a7b2de 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -5,6 +5,7 @@ mod internal_macros; mod any; +mod application; pub(crate) mod bit_string; #[cfg(feature = "alloc")] mod bmp_string; @@ -21,6 +22,7 @@ mod octet_string; mod oid; mod option...
5
309
252
51f670ed65771354b3a2467440170df3fae184c1
Arthur Gautier
2025-05-06T22:13:00
bump signature git pin (#1823)
diff --git a/Cargo.lock b/Cargo.lock index 5518aa63..13015556 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,7 +20,7 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" version = "0.6.0-rc.0" -source = "git+https://github.com/RustCrypto/traits.git#ac54439098463...
1
7
7
e7e4b54505963e4d58cbe839970ea81cf1a87673
Arthur Gautier
2025-05-06T21:22:11
x509-cert: add a CRL builder (#1759) * x509-cert: Create a `CrlNumber` from native types * x509-cert: add a CRL builder
diff --git a/x509-cert/src/builder.rs b/x509-cert/src/builder.rs index 07d0fcff..f993d9d0 100644 --- a/x509-cert/src/builder.rs +++ b/x509-cert/src/builder.rs @@ -13,9 +13,13 @@ use spki::{ use crate::{ AlgorithmIdentifier, SubjectPublicKeyInfo, certificate::{Certificate, TbsCertificate, Version}, - ext::...
5
377
5
305318ba855f26c2813e4e5cf2584654f98d7935
dishmaker
2025-05-06T17:20:41
der: docs + return `ErrorKind::Noncanonical` in `EXPLICIT` when primitive (#1818)
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index ce35e062..626272cd 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -28,18 +28,16 @@ impl<T> ContextSpecific<T> { /// Attempt to decode an `EXPLICIT` ASN.1 `CONTEXT-SPECIFIC` field with the...
1
16
14
d5ab6e8998b9763f0ffd0aa7461d69308d775392
Arthur Gautier
2025-05-06T04:19:58
x509-cert: document builder mistakes (#1817) This reverts commit c4a54802656963c8fa300eaf39c30fcdefde5f62.
diff --git a/Cargo.lock b/Cargo.lock index 68e0161c..5518aa63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -507,7 +507,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.17.0-pre.9" -source = "git+https://github.com/RustCrypto/signatures.git#d2a93b3d5a45a54c19ef29ddc009d9ad22d8b057" +source = "git+https://...
2
155
2
d7a637fc0ea46fb4fefefe5c52b513b0de6e66be
Arthur Gautier
2025-05-06T02:08:56
x509-cert: domain validated should accept CN even though not recommended (#1815)
diff --git a/x509-cert/src/builder/profile/cabf/tls.rs b/x509-cert/src/builder/profile/cabf/tls.rs index a43f8767..4b28d554 100644 --- a/x509-cert/src/builder/profile/cabf/tls.rs +++ b/x509-cert/src/builder/profile/cabf/tls.rs @@ -149,7 +149,10 @@ impl CertificateType { .filter_map(|rdn| { ...
1
4
1
c4a54802656963c8fa300eaf39c30fcdefde5f62
Arthur Gautier
2025-05-05T22:41:40
Revert "x509-cert: document builder mistakes (#1777)" (#1816) This reverts commit 4f5a02a8cee651438cf0bca361f68c5acc6343d8.
diff --git a/x509-cert/src/builder.rs b/x509-cert/src/builder.rs index 07d0fcff..705a9797 100644 --- a/x509-cert/src/builder.rs +++ b/x509-cert/src/builder.rs @@ -243,42 +243,6 @@ pub trait Builder: Sized { S::VerifyingKey: EncodePublicKey; /// Run the object through the signer and build it. - /// - ...
1
0
153
4f5a02a8cee651438cf0bca361f68c5acc6343d8
Arthur Gautier
2025-05-05T21:26:45
x509-cert: document builder mistakes (#1777)
diff --git a/x509-cert/src/builder.rs b/x509-cert/src/builder.rs index 705a9797..07d0fcff 100644 --- a/x509-cert/src/builder.rs +++ b/x509-cert/src/builder.rs @@ -243,6 +243,42 @@ pub trait Builder: Sized { S::VerifyingKey: EncodePublicKey; /// Run the object through the signer and build it. + /// + ...
1
153
0
cf949eec93738debcd2cff586924b4e5ff5dc0d2
dishmaker
2025-05-05T15:52:59
der: simplify `Tag::peek_matches` in context-specific decoder (#1811)
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index ee51a496..ce35e062 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -47,7 +47,7 @@ impl<T> ContextSpecific<T> { where T: Decode<'a>, { - if !peek_tag_matches(reader, Cl...
2
20
24
6cd020afdef8538dcf0a3f23e2bb51a6ebed0a64
dishmaker
2025-05-05T12:52:05
der: test: add `ImplicitChoice` `constructed: true` variant (#1809)
diff --git a/der/tests/derive.rs b/der/tests/derive.rs index 37622307..03c02bab 100644 --- a/der/tests/derive.rs +++ b/der/tests/derive.rs @@ -111,9 +111,10 @@ mod choice { /// `Choice` with `IMPLICIT` tagging. mod implicit { + use der::asn1::Null; use der::{ Choice, Decode, Enc...
1
23
1
76a97a684edf42bf9bfaf41692edf889aeb43b3e
dishmaker
2025-05-05T12:49:34
der_derive: rewrite `EncodeValue::value_len` as simple addition (#1810)
diff --git a/der_derive/src/sequence.rs b/der_derive/src/sequence.rs index ffe0847d..21099887 100644 --- a/der_derive/src/sequence.rs +++ b/der_derive/src/sequence.rs @@ -135,12 +135,12 @@ impl DeriveSequence { let (_, ty_generics, where_clause) = self.generics.split_for_impl(); let (impl_generics, _,...
1
5
8
1ae7ce802ca8f892df7b99ccbf0d9b656b29e052
Arthur Gautier
2025-05-05T04:07:42
Bump to `signature` 3 (#1784)
diff --git a/Cargo.lock b/Cargo.lock index 416699be..ef01969d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,7 +20,7 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" version = "0.6.0-rc.0" -source = "git+https://github.com/RustCrypto/traits.git#2dc47f8d1461a...
5
30
16
ae2652074457939efd4bf40ecc66b78708fe75e1
Tony Arcieri
2025-05-04T23:31:20
der: remove `IndefiniteLength` (#1807) The original idea of this type was to have a type-safe distinction between DER lengths (`Length`) and potentially indefinite BER lengths (`IndefiniteLength`), but really what's needed is to make the `Length` type support idefinite lengths when `EncodingRules::Ber` are in use. Ot...
diff --git a/der/src/length.rs b/der/src/length.rs index 15d30699..345431d5 100644 --- a/der/src/length.rs +++ b/der/src/length.rs @@ -308,116 +308,10 @@ impl<'a> arbitrary::Arbitrary<'a> for Length { } } -/// Length type with support for indefinite lengths as used by ASN.1 BER, -/// as described in X.690 Secti...
2
2
124
56c431e8148f0ed9ad72487fa1e5dad1f01e0d63
dishmaker
2025-05-04T23:31:07
der: fix `Tag::peek_optional` for 6-byte and 7+ byte tags (#1804)
diff --git a/der/src/tag.rs b/der/src/tag.rs index 13a92b2d..bd2a6b30 100644 --- a/der/src/tag.rs +++ b/der/src/tag.rs @@ -178,16 +178,15 @@ impl Tag { return Ok(Some(tag)); } - for i in 2..Self::MAX_SIZE { + for i in 2..=Self::MAX_SIZE { let slice = &mut buf[0..i]; - ...
1
37
16
cb9628457837e50085e514180f9462a06b4f4754
dishmaker
2025-05-04T18:53:19
der: use strict context-specific skipping condition (equal tag numbers only) (#1740)
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index 6be80bfc..ee51a496 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -1,7 +1,7 @@ //! Context-specific field. use crate::{ - Choice, Decode, DecodeValue, DerOrd, Encode, EncodeValue, Encod...
2
63
48
4a63b697329fdac45a62af4a3b7015685467fdef
dishmaker
2025-05-04T18:44:25
der: fix X.680 tag order: compare class and number first (#1790)
diff --git a/der/src/tag.rs b/der/src/tag.rs index 03d6f90f..625e6619 100644 --- a/der/src/tag.rs +++ b/der/src/tag.rs @@ -440,11 +440,9 @@ impl Encode for Tag { impl DerOrd for Tag { fn der_cmp(&self, other: &Self) -> Result<Ordering> { - Ok(self - .class() - .cmp(&other.class()) -...
1
95
6
fc5b0283e9521c1d0333ff8ae7ba1888b6fb1976
dishmaker
2025-05-04T18:43:47
der: apply nightly clippy fixes (3350c1eb3 2025-05-01) (#1805)
diff --git a/der/src/asn1/bmp_string.rs b/der/src/asn1/bmp_string.rs index 9c8da0f8..16a02aa1 100644 --- a/der/src/asn1/bmp_string.rs +++ b/der/src/asn1/bmp_string.rs @@ -133,14 +133,14 @@ impl From<&BmpString> for BmpString { impl fmt::Debug for BmpString { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Res...
5
78
181
0fbce4057edec542d1a21ecfc468248101202bc5
dishmaker
2025-05-04T18:33:04
der: rename decode_value fns for cleaner cargo bloat output (#1802)
diff --git a/der/src/asn1/sequence_of.rs b/der/src/asn1/sequence_of.rs index ca93926a..eeae99fe 100644 --- a/der/src/asn1/sequence_of.rs +++ b/der/src/asn1/sequence_of.rs @@ -181,6 +181,19 @@ where } } +#[cfg(feature = "alloc")] +fn decode_value_vec_inner<'a, T: Decode<'a>, R: Reader<'a>>( + reader: &mut R, ...
2
26
18
09489092bb26249fd847256fd1240533ba684e75
dishmaker
2025-05-04T02:51:36
der: reduce llvm-ir in `SliceReader::read_nested` (#1801)
diff --git a/der/src/reader/slice.rs b/der/src/reader/slice.rs index 3795948e..6df3f58a 100644 --- a/der/src/reader/slice.rs +++ b/der/src/reader/slice.rs @@ -66,6 +66,13 @@ impl<'a> SliceReader<'a> { .ok_or_else(|| Error::incomplete(self.input_len())) } } + /// Creates new [`SliceRead...
1
8
4
4d123e6a12414f3ef25cefa676b57dcb5f5d0378
dishmaker
2025-05-04T02:19:50
der: rewrite `der_ord` as match without try! `?` operator (#1799)
diff --git a/der/src/ord.rs b/der/src/ord.rs index 80684b87..beab2f28 100644 --- a/der/src/ord.rs +++ b/der/src/ord.rs @@ -30,9 +30,18 @@ where T: EncodeValue + ValueOrd + Tagged, { fn der_cmp(&self, other: &Self) -> Result<Ordering> { - match self.header()?.der_cmp(&other.header()?)? { - O...
1
12
3
167f3a4a228f23bb3087a0e0ede30cc8d0829b66
dishmaker
2025-05-03T23:42:43
der: const `Any::to_ref`, `BytesOwned::to_ref` (#1797)
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 583fe030..69ac854b 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -233,6 +233,14 @@ mod allocating { value: BytesOwned::default(), } } + + /// Create a new [`AnyRef`] from the provided [`Any`] owned...
3
24
7
90b66172e0076c907f256aaa49d36c4a166965e8
dishmaker
2025-05-02T20:31:01
der: fix BMPString compatibility in derive macros (#1793)
diff --git a/der/src/asn1/bmp_string.rs b/der/src/asn1/bmp_string.rs index fa42d1ae..9c8da0f8 100644 --- a/der/src/asn1/bmp_string.rs +++ b/der/src/asn1/bmp_string.rs @@ -2,7 +2,7 @@ use crate::{ BytesOwned, DecodeValue, EncodeValue, Error, FixedTag, Header, Length, Reader, Result, Tag, - Writer, + Writer...
2
20
1
217b6eff7bf1b15d4fea21a3a186c2faee4a4344
dishmaker
2025-05-02T16:53:13
der: constify `is_class` fns (#1791)
diff --git a/der/src/tag.rs b/der/src/tag.rs index ce374a31..03d6f90f 100644 --- a/der/src/tag.rs +++ b/der/src/tag.rs @@ -251,23 +251,23 @@ impl Tag { } /// Is this an application tag? - pub fn is_application(self) -> bool { - self.class() == Class::Application + pub const fn is_application(se...
1
8
8
c8c383c11ff85e055a1d3d4c80899e063dad72b8
dishmaker
2025-05-02T00:31:03
base64ct: cargo fmt (#1789)
diff --git a/base64ct/src/decoder.rs b/base64ct/src/decoder.rs index d711906e..bb92b6d7 100644 --- a/base64ct/src/decoder.rs +++ b/base64ct/src/decoder.rs @@ -1,10 +1,11 @@ //! Buffered Base64 decoder. use crate::{ + encoding, + line_ending::{CHAR_CR, CHAR_LF}, Encoding, Error::{self, InvalidLength}...
3
9
6
be1caa3cc42b06bf01a37d1858826a4905b74904
dishmaker
2025-04-26T14:17:11
der: add `IsConstructed` trait, impl'ed on any `FixedTag` (#1744) Closes #1741
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index c282d1cd..6be80bfc 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -3,6 +3,7 @@ use crate::{ Choice, Decode, DecodeValue, DerOrd, Encode, EncodeValue, EncodeValueRef, Error, Header, ...
5
43
5
907a76a817f674ae9c61114951264aa05060d085
dishmaker
2025-04-25T21:32:02
pkcs8: add PrivateKeyInfo.attributes [0] IMPLICIT reader (#1783)
diff --git a/pkcs8/src/private_key_info.rs b/pkcs8/src/private_key_info.rs index e61f8f1e..c862f0d9 100644 --- a/pkcs8/src/private_key_info.rs +++ b/pkcs8/src/private_key_info.rs @@ -5,7 +5,7 @@ use core::fmt; use der::{ Decode, DecodeValue, Encode, EncodeValue, FixedTag, Header, Length, Reader, Sequence, TagMode...
1
8
1
8364eb5e921af1f4bcbe9857a09736d36b46866a
dishmaker
2025-04-25T13:16:30
gss-api: change `NegHints::hint_name` to GeneralStringRef type (#1779) * der: add minimal GeneralStringRef type Co-authored-by: Arthur Gautier <superbaloo+registrations.github@superbaloo.net>
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 3bbd0a0f..22cc4d0a 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -11,6 +11,7 @@ mod bmp_string; mod boolean; mod choice; mod context_specific; +mod general_string; mod generalized_time; mod ia5_string; mod integer; @@ -35,6 +36,7 @@ pub use self::{ ...
3
43
11
ec47459b2d43c9701fcce7de9e82dd731a13576b
Arthur Gautier
2025-04-23T18:41:59
der-derive: v0.8.0-rc.2 (#1781)
diff --git a/Cargo.lock b/Cargo.lock index 243df846..439fb97d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.8.0-rc.1" +version = "0.8.0-rc.2" dependencies = [ "proc-macro2", "quote", diff --git a/der_derive/Cargo.toml b/der_derive/Ca...
2
2
2
02642bdfe5421a7aeb180f9afcdb38ffcb346111
Mihael Berčič
2025-04-22T18:10:25
Removed std requirements for x509-cert/builder feature. Removed the default feature from sha1 (includes std). (#1709)
diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index eaf030db..b805a02d 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -23,7 +23,7 @@ spki = { version = "0.8.0-rc.0", features = ["alloc"] } # optional dependencies arbitrary = { version = "1.4", features = ["derive"], optional = true } dige...
3
5
4
27d812e1102354983e8fde4cc58aca7acd02f487
dishmaker
2025-04-22T18:04:43
x509-cert: fix test: stuck zlint stdout reader (#1776) * x509-cert: fix test: stuck zlint stdout reader
diff --git a/x509-cert/test-support/src/zlint.rs b/x509-cert/test-support/src/zlint.rs index e3743a75..1f55798b 100644 --- a/x509-cert/test-support/src/zlint.rs +++ b/x509-cert/test-support/src/zlint.rs @@ -140,16 +140,19 @@ Rounds = 100 pub fn check_certificate(pem: &[u8], ignored: &[&str]) { let tmp_dir = tem...
1
19
13
48040c838c28015459d035c67bfd760ace8dea6f
Arthur Gautier
2025-04-21T18:38:43
cmpv2: build `OobCertHash` from a certificate (#1766) * cmpv2: build `OobCertHash` from a certificate * crmf: make `CertId` not profile specific * x509-cert: provide hash method to certificate
diff --git a/Cargo.lock b/Cargo.lock index e5008a79..7701a064 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -289,6 +289,7 @@ dependencies = [ "const-oid", "crmf", "der", + "digest", "hex-literal 0.4.1", "spki", "x509-cert", @@ -1873,6 +1874,7 @@ dependencies = [ "arbitrary", "const-oid", "der", + "diges...
6
72
6
d933c0dec4d437da9e442d38970062719c876425
dishmaker
2025-04-21T15:47:20
der: use `read_nested` to check length of `IMPLICIT` types (#1739)
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index 12999571..c282d1cd 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -63,8 +63,14 @@ impl<T> ContextSpecific<T> { T: DecodeValue<'a> + Tagged, { Self::decode_with::<_, _, T...
2
24
6
a682e7b98825f3fbeba483382df93422997b96fc
dishmaker
2025-04-21T14:02:30
apply clippy div_ceil suggestion (#1770)
diff --git a/base32ct/src/encoding.rs b/base32ct/src/encoding.rs index 6b50f461..1343d1ca 100644 --- a/base32ct/src/encoding.rs +++ b/base32ct/src/encoding.rs @@ -261,7 +261,7 @@ pub const fn encoded_len<T: Encoding>(length: usize) -> usize { } else if T::PADDED { ((length - 1) / 5 + 1) * 8 } else { ...
3
3
3
33796225f810974872293dd04ed59d2b4b549131
dishmaker
2025-04-21T10:56:18
base64ct: doc fix for `Encoder::encode` (#1285) (#1771)
diff --git a/base64ct/src/encoder.rs b/base64ct/src/encoder.rs index 559a7ae9..7fccf0df 100644 --- a/base64ct/src/encoder.rs +++ b/base64ct/src/encoder.rs @@ -74,7 +74,7 @@ impl<'o, E: Encoding> Encoder<'o, E> { /// Encode the provided buffer as Base64, writing it to the output buffer. /// /// # Returns ...
1
1
1
7f63ffb17391cdc006d466a90f137c1d36f94c89
Arthur Gautier
2025-04-20T19:50:00
spki: adds a `der::Writer` adapter for `Digest` (#1769)
diff --git a/Cargo.lock b/Cargo.lock index 5047ac05..225e6a27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1478,6 +1478,7 @@ dependencies = [ "arbitrary", "base64ct", "der", + "digest", "hex-literal 1.0.0", "sha2", "tempfile", diff --git a/spki/Cargo.toml b/spki/Cargo.toml index 2d6ebe7e..bccd2348 100644 --...
6
42
50
cb1af5b6d539e9b1406c434b1d95c0bd4b229878
Arthur Gautier
2025-04-20T15:01:20
der: implement `Uint`/`Int` conversions from native types (#1762)
diff --git a/der/src/asn1/integer/int.rs b/der/src/asn1/integer/int.rs index 6dcec372..2203ba14 100644 --- a/der/src/asn1/integer/int.rs +++ b/der/src/asn1/integer/int.rs @@ -302,6 +302,75 @@ mod allocating { IntRef { inner } } } + + macro_rules! impl_from_traits { + ($($int:ty),+) ...
2
109
0
3ac3dc6a4cf2a949c20af03dc5993b8baf77033c
Arthur Gautier
2025-04-20T14:20:42
x509-cert: impl hash for name (#1764) * der: impl `Hash` for `SetOf` Fixes #1763 * x509-cert: impl `Hash` for `Name` Fixes #1763
diff --git a/der/src/arrayvec.rs b/der/src/arrayvec.rs index 7391c9ae..58cd83a9 100644 --- a/der/src/arrayvec.rs +++ b/der/src/arrayvec.rs @@ -5,7 +5,7 @@ use crate::{ErrorKind, Result}; /// Array-backed append-only vector type. -#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[derive(Clone, Debug, Eq, Pa...
4
7
7
1f4598d1015b0bc85f2655134cf3ae809b66b6b4
Arthur Gautier
2025-04-14T18:15:32
x509-cert: provide a `Time::now` method (#1761)
diff --git a/x509-cert/src/time.rs b/x509-cert/src/time.rs index 94e7f07f..6a37491d 100644 --- a/x509-cert/src/time.rs +++ b/x509-cert/src/time.rs @@ -79,6 +79,12 @@ impl Time { Ok(()) } + + /// Creates a `Time` from the current date. + #[cfg(feature = "std")] + pub fn now() -> der::Result<Self...
1
6
0
fb0634fbfbd35b5132caa3b1978d62a6af76f646
dishmaker
2025-04-14T12:49:11
der: fix derive optional OCTET/BIT STRING on `Option<&[u8]>` (#1737) * der: add test: optional OCTET/BIT STRING * der: fix derive for Option<&[u8]> and other Asn1Type's * der_derive: cargo clippy
diff --git a/der/tests/derive.rs b/der/tests/derive.rs index d2b8c603..818f3cc1 100644 --- a/der/tests/derive.rs +++ b/der/tests/derive.rs @@ -441,8 +441,19 @@ mod sequence { pub typed: &'a [u8], #[asn1(context_specific = "0")] pub context_specific: bool, + #[asn1(optional = "true")]...
3
26
11
f66f4c5f1fd53d9744a0837cf0913585b717d071
dishmaker
2025-04-14T12:46:12
der: fix append in `Encode::encode_to_vec` (#1760) * der: fix append in `Encode::encode_to_vec` * der: test encode_to_vec with append
diff --git a/der/src/encode.rs b/der/src/encode.rs index c1c69a1d..410137d5 100644 --- a/der/src/encode.rs +++ b/der/src/encode.rs @@ -4,7 +4,7 @@ use crate::{Header, Length, Result, SliceWriter, Tagged, Writer}; use core::marker::PhantomData; #[cfg(feature = "alloc")] -use {alloc::boxed::Box, alloc::vec::Vec, core...
2
28
7
c76165b6656521bd8dbf6c39beabadd07211b73c
Tony Arcieri
2025-04-08T13:03:08
Cargo.lock: bump dependencies (#1756) Updates the following dependencies: Updating git repository `https://github.com/RustCrypto/MACs.git` Updating git repository `https://github.com/RustCrypto/password-hashes.git` Updating crates.io index Locking 13 packages to latest compatible versions Updatin...
diff --git a/Cargo.lock b/Cargo.lock index 48388cc2..81a911ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,18 +214,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.32" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6088f3ae8c3608d19260cd7445411...
1
25
25
3552be9d74065915b3454952efc05b56699f784b
Said A.
2025-04-08T09:06:52
pkcs8: add hint on `private_key` field about its format (#1749) (#1751)
diff --git a/pkcs8/src/private_key_info.rs b/pkcs8/src/private_key_info.rs index e7aabccc..e61f8f1e 100644 --- a/pkcs8/src/private_key_info.rs +++ b/pkcs8/src/private_key_info.rs @@ -95,7 +95,7 @@ pub struct PrivateKeyInfo<Params, Key, PubKey> { /// X.509 `AlgorithmIdentifier` for the private key type. pub al...
1
1
1
fe59d44f0dbff8d9830463567bb763f377083ddb
dishmaker
2025-03-27T13:08:31
der: add test for implicitRef + explicitRef for SetOf (#1742)
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index 1cfe95b9..12999571 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -258,7 +258,10 @@ where #[allow(clippy::unwrap_used)] mod tests { use super::ContextSpecific; - use crate::{Decode, ...
1
75
1
feb56ca75db9dcc87c7df065f8a7577bef507188
dishmaker
2025-03-25T14:51:08
der: conversions between `heapless:Vec<u8>` and `OctetStringRef` (#1735) `heapless::Vec` is useful in `derive(Sequence)` fields in `no_std` environments
diff --git a/der/Cargo.toml b/der/Cargo.toml index fbaf21bf..45097229 100644 --- a/der/Cargo.toml +++ b/der/Cargo.toml @@ -25,6 +25,7 @@ flagset = { version = "0.4.6", optional = true } pem-rfc7468 = { version = "1.0.0-rc.1", optional = true, features = ["alloc"] } time = { version = "0.3.4", optional = true, default...
4
189
79
937e611fcbabe929f2ff76320dd33873ea3372dd
dishmaker
2025-03-24T18:59:28
der: add class bits consts for Application and Private tag support (#1721)
diff --git a/der/src/tag/class.rs b/der/src/tag/class.rs index 2a3bba53..14411811 100644 --- a/der/src/tag/class.rs +++ b/der/src/tag/class.rs @@ -2,19 +2,30 @@ use core::fmt; +/// `UNIVERSAL`: built-in types whose meaning is the same in all +/// applications. +pub const CLASS_UNIVERSAL: u8 = 0b00000000; +/// `APP...
1
38
4
e0910cd976fa7f56e5ae9eb0b7fa7bb40ee12b6a
dishmaker
2025-03-24T04:56:18
der_derive: add DecodeValue, EncodeValue macros (#1722) * der_derive: add SequenceDecode, SequenceEncode macros * der_derive: rename macros to DecodeValue, EncodeValue
diff --git a/der/src/lib.rs b/der/src/lib.rs index ef18ead8..cd0b88cc 100644 --- a/der/src/lib.rs +++ b/der/src/lib.rs @@ -385,7 +385,7 @@ pub use crate::{ pub use crate::{asn1::Any, document::Document}; #[cfg(feature = "derive")] -pub use der_derive::{BitString, Choice, Enumerated, Sequence, ValueOrd}; +pub use de...
4
145
22
4f2771d6b309d002a6a02cca40aef08cb047a4bd
Tomáš Jašek
2025-03-21T19:05:41
cmpv2: fix content of PkiBody::PollReq (#1734)
diff --git a/cmpv2/src/body.rs b/cmpv2/src/body.rs index f656d6c0..ca01add8 100644 --- a/cmpv2/src/body.rs +++ b/cmpv2/src/body.rs @@ -10,7 +10,7 @@ use crate::ann::{CaKeyUpdAnnContent, CertAnnContent, CrlAnnContent, RevAnnConten use crate::certified_key_pair::KeyRecRepContent; use crate::gen::{GenMsgContent, GenRepC...
1
2
2
516e1d3023d2fda1b29cd7757117cf931553df3f
dishmaker
2025-03-21T15:40:20
der_derive: fix derive(BitString): always encode max length (#1733) Encoded length is now data-independent
diff --git a/der/src/asn1/bit_string.rs b/der/src/asn1/bit_string.rs index c182edab..1104d2bf 100644 --- a/der/src/asn1/bit_string.rs +++ b/der/src/asn1/bit_string.rs @@ -1,6 +1,6 @@ //! ASN.1 `BIT STRING` support. -pub mod fixed_len_bit_string; +pub mod allowed_len_bit_string; use crate::{ BytesRef, DecodeV...
5
138
35
5d903eae2eb0afa22511fe42390d1fba292eb0fc
dishmaker
2025-03-21T15:38:52
der: conversions between `BitStringRef`/`OctetStringRef` and `[u8; N]` (#1731) These are helpful for custom drive when struct fields are byte arrays
diff --git a/der/src/asn1/bit_string.rs b/der/src/asn1/bit_string.rs index 146541bf..c182edab 100644 --- a/der/src/asn1/bit_string.rs +++ b/der/src/asn1/bit_string.rs @@ -193,6 +193,24 @@ impl<'a> TryFrom<&&'a [u8]> for BitStringRef<'a> { } } +impl<'a, const N: usize> TryFrom<&'a [u8; N]> for BitStringRef<'a> {...
3
117
1
4bbb6400426de043e00054d84f6d01b5dd4e45af
Tony Arcieri
2025-03-18T21:23:46
Cargo.lock: bump dependencies (#1729) Updates the following dependencies: $ cargo update Updating git repository `https://github.com/RustCrypto/MACs.git` Updating git repository `https://github.com/RustCrypto/password-hashes.git` Updating crates.io index Locking 47 packages to latest compatible v...
diff --git a/Cargo.lock b/Cargo.lock index bd5959bb..a1c2c820 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,19 +90,9 @@ dependencies = [ "proptest", ] -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0...
1
99
104
93c8be896cc3d649777fc3d9539878db46f40609
Tony Arcieri
2025-03-18T20:36:21
der: deprecate `TagNumber::new` (#1727) After #1651 the inner `u32` of `TagNumber` is now `pub` and the `TagNumber::new` function no longer maintains an invariant (which it previously did by panicking when tag numbers are out-of-range). With the field now `pub` there is no longer a need to call a function to construc...
diff --git a/der/src/asn1/context_specific.rs b/der/src/asn1/context_specific.rs index af4e3fb0..1cfe95b9 100644 --- a/der/src/asn1/context_specific.rs +++ b/der/src/asn1/context_specific.rs @@ -281,7 +281,7 @@ mod tests { #[test] fn context_specific_with_explicit_field() { - let tag_number = TagNumb...
7
57
53
500cd652e66dd8191776ccf9720bd75a2bb5b716
turbocool3r
2025-03-17T19:17:10
der: remove 256 MiB limit on `Length` (#1726)
diff --git a/der/src/length.rs b/der/src/length.rs index efc107c9..e1681e2c 100644 --- a/der/src/length.rs +++ b/der/src/length.rs @@ -7,9 +7,6 @@ use core::{ ops::{Add, Sub}, }; -/// Maximum length as a `u32` (256 MiB). -const MAX_U32: u32 = 0xfff_ffff; - /// Octet identifying an indefinite length as describe...
1
18
34
0b3a0b2e00741e54e81ae0b742cd5fcacd640d2e
dishmaker
2025-03-16T15:20:19
der: remove TagNumber::N0..N30 consts (#1724)
diff --git a/der/src/tag.rs b/der/src/tag.rs index 3930665b..bc85e85a 100644 --- a/der/src/tag.rs +++ b/der/src/tag.rs @@ -189,7 +189,7 @@ impl Tag { } /// Get the [`Class`] that corresponds to this [`Tag`]. - pub fn class(self) -> Class { + pub const fn class(self) -> Class { match self { ...
9
50
184
a82f6688c8141559ff4f7e54dacc41bb63a5eead
dishmaker
2025-03-16T00:55:29
der: add `Decode::from_der_partial` (#1725) Closes #1278
diff --git a/der/src/decode.rs b/der/src/decode.rs index 9588a1f0..59e4a51d 100644 --- a/der/src/decode.rs +++ b/der/src/decode.rs @@ -7,7 +7,7 @@ use core::marker::PhantomData; use crate::{PemReader, pem::PemLabel}; #[cfg(doc)] -use crate::{Length, Tag}; +use crate::{ErrorKind, Length, Tag}; #[cfg(feature = "al...
3
44
2
5f58a61e05ddbfd3e1de7637f413c57c2ab35da4
Balder
2025-03-14T18:42:40
Make pem a optional feature in pkcs12 crate (#1710) * Made pem a optional feature in pkcs12 crate * pkcs12: keep pem by default --------- Co-authored-by: balder <balder@grindoy.no> Co-authored-by: Arthur Gautier <superbaloo+registrations.github@superbaloo.net>
diff --git a/pkcs12/Cargo.toml b/pkcs12/Cargo.toml index af399576..5e296bf6 100644 --- a/pkcs12/Cargo.toml +++ b/pkcs12/Cargo.toml @@ -16,11 +16,11 @@ edition = "2024" rust-version = "1.85" [dependencies] -der = { version = "0.8.0-rc.0", features = ["alloc", "derive", "oid", "pem"] } -spki = { version = "0.8.0-rc.0...
1
7
5
631107d88229b88e1ab3511b8da8550e99b08702
dishmaker
2025-03-14T16:51:59
der: const GeneralizedTime::from_date_time (#1718) * feat: const DateTime::new * der: const DateTime::new * der: const GeneralizedTime::to_date_time * test: add max valid/invalid generalized time * fix cargo clippy &
diff --git a/der/src/asn1/generalized_time.rs b/der/src/asn1/generalized_time.rs index c3a0be00..63305315 100644 --- a/der/src/asn1/generalized_time.rs +++ b/der/src/asn1/generalized_time.rs @@ -40,7 +40,7 @@ impl GeneralizedTime { } /// Convert this [`GeneralizedTime`] into a [`DateTime`]. - pub fn to_d...
2
123
17