Skip to content

Commit 7784544

Browse files
authored
der v0.8.0 (#2234)
## Added - Custom error types support to the `Decode` and `DecodeValue` traits (#1055) - `EncodingRules` enum (#1321) - `Decode::from_ber` (#1389) - Documentation for field-level `tag_mode` attribute (#1401) - `Hash` implementation for `AlgorithmIdentifier` (#1414) - `SequenceRef::as_bytes` and `AsRef<[u8]>` impl (#1454) - `Reader::peek_into` (#1478) - `GeneralString` variant to `Tag` (#1512) - Conversions from `OctetString(Ref)` to `Vec`/`Bytes` (#1540) - Custom error types in derive macros (#1560) - Support for tags beyond 30 (#1651) - Const `::new` to `Length`, `BytesRef`, and `AnyRef` (#1713) - Const `GeneralizedTime::from_date_time` (#1718) - `Decode::from_der_partial` (#1725) - Conversions between `BitStringRef`/`OctetStringRef` and `[u8; N]` (#1731) - Add class bits consts for Application and Private tag support (#1721) - conversions between `heapless:Vec<u8>` and `OctetStringRef` (#1735) - `IsConstructed` trait, impl'ed on any `FixedTag` (#1744) - Implement `Hash` for `SetOf` (#1764) - Implement `Uint`/`Int` conversions from native types (#1762) - Support for `APPLICATION`, `CONTEXT-SPECIFIC` and `PRIVATE` tags (#1819, #1825, #1944) - Support `Cow<[u8]>` in `derive(Sequence)` (#1850) - `diagnostic::on_unimplemented` attributes (#1876) - `Reader::read_value`, auto-nest `DecodeValue` (#1877, #1895, #1897, #1901) - Indefinite length support for BER (#1884, #1885, #1894, #1900, #1902, #1910) - Constructed OctetString support (#1899, #1922) - string conversions, predicate methods for EncodingRules (#1903, #1953) - `Any::header` (#1935) - `Tag::RelativeOid` (#1942) - `ber` feature (#1948, #1950) - Hash derive for `StringOwned` and `Ia5String` (#1973) - Implement `DecodeValue/EncodeValue/Tagged` for `Cow` (#2093) - Add doc examples for `EncodeValue`, `Encode`, `DecodeValue`, `Decode`, `Error`, `ErrorKind`, `Tagged`, `FixedTag`, `IsConstructed`, `Tag`, `Length`, `Header` (#2075, #2071, #2070, #2064, #2058, #2052, #2053, #2051) - `SequenceRef::new` (#2224) ## Changed - Return `Tag::Integer.length_error()` on empty ints (#1400) - Allow all blanket impls on `?Sized` types (#1451) - Refactor `Tag::peek` (#1479) - Refactor `Header::peek` (#1480) - Use `core::error::Error` (#1553) - Use 2024 edition, bump MSRV to 1.85 (#1670) - Bump `const-oid` to v0.10 (#1676) - Reject zero lengths reads (#1716) - Deprecate `TagNumber::new` (#1727) - Use strict context-specific skipping condition (equal tag numbers only) (#1740) - Const `Any::to_ref`, `BytesOwned::to_ref` (#1797) - Return `ErrorKind::Noncanonical` in `EXPLICIT` when primitive (#1818) - Use `read_nested` to check length of `IMPLICIT` types (#1739) - Simplify `From<&UintRef<'a>>` for `Uint` (#1840) - Make `ObjectIdentifier<MAX_SIZE>` impls generic (#1851) - Extract `reader::position::Position` (#1880) - Make `Reader` cloneable (#1883) - Simplify `Header::peek` and `Tag::peek` (#1886) - Improve constructed bit handling (#1919) - Use fat pointer in `OctetStringRef`, consolidate bytes/string modules, improve internal ref types (#1920, #1921, #1998, #2040) - Change constructor `Header::new`, add `Header::with_length`, tests for constructed octet string (#1931, #1930) - Simplify `der_cmp` for `Length` (#1997) - Rename variable encoder -> writer and improve example (#2078) - Have `PemReader` decode to `Cow::Owned` (#2094) - Only sort `SET OF` types with `EncodingRules::Der` (#2219) - `SetOf` and `SequenceOf` now require `heapless` feature (#2220, #2229) ## Fixed - Append in `Encode::encode_to_vec` (#1760) - Derive optional OCTET/BIT STRING on `Option<&[u8]>` (#1737) - X.680 tag order: compare class and number first (#1790) - BMPString compatibility in derive macros (#1793) - `Tag::peek_optional` for 6-byte and 7+ byte tags (#1804) - `Header::peek` for 11-byte tag-lengths (#1828) - Panic in `value_cmp`: add `Iterator::size_hint` (#1830) - Error position tracking improvements (#1889, #2080, #2079) - Bound `Decode(Value)::Error` on `core::error::Error` (#2137) - Have `SetOf(Vec)::insert` check for duplicates (#2217) ## Removed - `TagNumber::N0..N30` consts (#1724) - 256MiB limit on `Length` (#1726) - Generic `<T>` from `Reader::finish` (#1833) - Deprecated `SetOf(Vec)::add` methods (#2232) - `SequenceRef` lifetime (#2224)
1 parent 3a39d5e commit 7784544

File tree

16 files changed

+79
-74
lines changed

16 files changed

+79
-74
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmpv2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.85"
1717

1818
[dependencies]
1919
crmf = "=0.3.0-pre.0"
20-
der = { version = "0.8.0-rc.10", features = ["alloc", "derive", "flagset", "oid"] }
20+
der = { version = "0.8", features = ["alloc", "derive", "flagset", "oid"] }
2121
spki = "0.8.0-rc.4"
2222
x509-cert = { version = "0.3.0-rc.4", default-features = false }
2323

cms/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.85"
1616

1717
[dependencies]
1818
const-oid = { version = "0.10", features = ["db"] }
19-
der = { version = "0.8.0-rc.10", features = ["ber", "derive", "oid"] }
19+
der = { version = "0.8", features = ["ber", "derive", "oid"] }
2020
spki = "0.8.0-rc.4"
2121
x509-cert = { version = "0.3.0-rc.4", default-features = false }
2222

crmf/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.85"
1717

1818
[dependencies]
1919
cms = "=0.3.0-pre.2"
20-
der = { version = "0.8.0-rc.10", features = ["alloc", "derive"] }
20+
der = { version = "0.8", features = ["alloc", "derive"] }
2121
spki = "0.8.0-rc.3"
2222
x509-cert = { version = "0.3.0-rc.4", default-features = false }
2323

der/CHANGELOG.md

Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,96 +4,98 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## 0.8.0 (UNRELEASED)
8-
7+
## 0.8.0 (2026-02-13)
98
### Added
10-
- `EncodingRules` enum ([#1321])
119
- Custom error types support to the `Decode` and `DecodeValue` traits ([#1055])
10+
- `EncodingRules` enum ([#1321])
1211
- `Decode::from_ber` ([#1389])
1312
- Documentation for field-level `tag_mode` attribute ([#1401])
1413
- `Hash` implementation for `AlgorithmIdentifier` ([#1414])
1514
- `SequenceRef::as_bytes` and `AsRef<[u8]>` impl ([#1454])
1615
- `Reader::peek_into` ([#1478])
1716
- `GeneralString` variant to `Tag` ([#1512])
18-
- conversions from `OctetString(Ref)` to `Vec`/`Bytes` ([#1540])
19-
- Custom error types in derive macros. ([#1560])
17+
- Conversions from `OctetString(Ref)` to `Vec`/`Bytes` ([#1540])
18+
- Custom error types in derive macros ([#1560])
2019
- Support for tags beyond 30 ([#1651])
21-
- const `::new` to `Length`, `BytesRef`, and `AnyRef` ([#1713])
22-
- const `GeneralizedTime::from_date_time` ([#1718])
20+
- Const `::new` to `Length`, `BytesRef`, and `AnyRef` ([#1713])
21+
- Const `GeneralizedTime::from_date_time` ([#1718])
2322
- `Decode::from_der_partial` ([#1725])
24-
- conversions between `BitStringRef`/`OctetStringRef` and `[u8; N]` ([#1731])
25-
- add class bits consts for Application and Private tag support ([#1721])
23+
- Conversions between `BitStringRef`/`OctetStringRef` and `[u8; N]` ([#1731])
24+
- Add class bits consts for Application and Private tag support ([#1721])
2625
- conversions between `heapless:Vec<u8>` and `OctetStringRef` ([#1735])
2726
- `IsConstructed` trait, impl'ed on any `FixedTag` ([#1744])
28-
- impl `Hash` for `SetOf` ([#1764])
29-
- implement `Uint`/`Int` conversions from native types ([#1762])
30-
- support for `APPLICATION`, `CONTEXT-SPECIFIC` and `PRIVATE` tags ([#1819]) ([#1825]) ([#1944])
31-
- support `Cow<[u8]>` in derive(Sequence) ([#1850])
27+
- Implement `Hash` for `SetOf` ([#1764])
28+
- Implement `Uint`/`Int` conversions from native types ([#1762])
29+
- Support for `APPLICATION`, `CONTEXT-SPECIFIC` and `PRIVATE` tags ([#1819], [#1825], [#1944])
30+
- Support `Cow<[u8]>` in `derive(Sequence)` ([#1850])
3231
- `diagnostic::on_unimplemented` attributes ([#1876])
33-
- `Reader::read_value`, auto-nest `DecodeValue` ([#1877]) ([#1895]) ([#1897]) ([#1901])
34-
- indefinite length support ([#1884]) ([#1885]) ([#1894]) ([#1900]) ([#1902]) ([#1910])
35-
- constructed OctetString support ([#1899]) ([#1922])
36-
- string conversions, predicate methods for EncodingRules ([#1903]) ([#1953])
37-
- fn `Any::header` ([#1935])
32+
- `Reader::read_value`, auto-nest `DecodeValue` ([#1877], [#1895], [#1897], [#1901])
33+
- Indefinite length support for BER ([#1884], [#1885], [#1894], [#1900], [#1902], [#1910])
34+
- Constructed OctetString support ([#1899], [#1922])
35+
- string conversions, predicate methods for EncodingRules ([#1903], [#1953])
36+
- `Any::header` ([#1935])
3837
- `Tag::RelativeOid` ([#1942])
39-
- ber feature ([#1948]) ([#1950])
40-
- Hash derive for StringOwned and Ia5String ([#1973])
41-
- impl `DecodeValue/EncodeValue/Tagged` for `Cow` ([#2093])
38+
- `ber` feature ([#1948], [#1950])
39+
- Hash derive for `StringOwned` and `Ia5String` ([#1973])
40+
- Implement `DecodeValue/EncodeValue/Tagged` for `Cow` ([#2093])
41+
- Add doc examples for `EncodeValue`, `Encode`, `DecodeValue`, `Decode`, `Error`, `ErrorKind`, `Tagged`, `FixedTag`,
42+
`IsConstructed`, `Tag`, `Length`, `Header` ([#2075], [#2071], [#2070], [#2064], [#2058], [#2052], [#2053], [#2051])
43+
- `SequenceRef::new` ([#2224])
4244

4345
### Changed
44-
- Bump `const-oid` to v0.10 ([#1676])
4546
- Return `Tag::Integer.length_error()` on empty ints ([#1400])
46-
- have `Reader::peek*` methods take `&mut self` ([#1418])
47-
- allow all blanket impls on `?Sized` types ([#1451])
48-
- refactor `Tag::peek` ([#1479])
49-
- refactor `Header::peek` ([#1480])
50-
- use `core::error::Error` ([#1553])
47+
- Allow all blanket impls on `?Sized` types ([#1451])
48+
- Refactor `Tag::peek` ([#1479])
49+
- Refactor `Header::peek` ([#1480])
50+
- Use `core::error::Error` ([#1553])
5151
- Use 2024 edition, bump MSRV to 1.85 ([#1670])
52+
- Bump `const-oid` to v0.10 ([#1676])
5253
- Reject zero lengths reads ([#1716])
53-
- deprecate `TagNumber::new` ([#1727])
54-
- use strict context-specific skipping condition (equal tag numbers only) ([#1740])
55-
- const `Any::to_ref`, `BytesOwned::to_ref` ([#1797])
56-
- return `ErrorKind::Noncanonical` in `EXPLICIT` when primitive ([#1818])
57-
- use `read_nested` to check length of `IMPLICIT` types ([#1739])
58-
- simplify `From<&UintRef<'a>>` for `Uint` ([#1840])
59-
- make `ObjectIdentifier<MAX_SIZE>` impls generic ([#1851])
60-
- extract `reader::position::Position` ([#1880])
61-
- make `Reader` cloneable ([#1883])
62-
- simplify `Header::peek` and `Tag::peek` ([#1886])
63-
- improve constructed bit handling ([#1919])
64-
- use fat pointer in `OctetStringRef`, consolidate bytes/string modules, improve internal ref types ([#1920]) ([#1921]) ([#1998]) ([#2040])
65-
- change constructor `Header::new`, add `Header::with_length`, tests for constructed octet string ([#1931]) ([#1930])
66-
- simplify der_cmp for Length ([#1997])
67-
- add doc examples of `EncodeValue`, `Encode`, `DecodeValue`, `Decode`, `Error`, `ErrorKind`, `Tagged`, `FixedTag`, `IsConstructed`, `Tag`, `Length`, `Header` ([#2075]) ([#2071]) ([#2070]) ([#2064]) ([#2058]) ([#2052]) ([#2053]) ([#2051])
68-
- rename variable encoder -> writer and improve example ([#2078])
69-
- have `PemReader` decode to `Cow::Owned` ([#2094])
70-
- only sort `SET OF` types with `EncodingRules::Der` ([#2219])
54+
- Deprecate `TagNumber::new` ([#1727])
55+
- Use strict context-specific skipping condition (equal tag numbers only) ([#1740])
56+
- Const `Any::to_ref`, `BytesOwned::to_ref` ([#1797])
57+
- Return `ErrorKind::Noncanonical` in `EXPLICIT` when primitive ([#1818])
58+
- Use `read_nested` to check length of `IMPLICIT` types ([#1739])
59+
- Simplify `From<&UintRef<'a>>` for `Uint` ([#1840])
60+
- Make `ObjectIdentifier<MAX_SIZE>` impls generic ([#1851])
61+
- Extract `reader::position::Position` ([#1880])
62+
- Make `Reader` cloneable ([#1883])
63+
- Simplify `Header::peek` and `Tag::peek` ([#1886])
64+
- Improve constructed bit handling ([#1919])
65+
- Use fat pointer in `OctetStringRef`, consolidate bytes/string modules, improve internal ref types
66+
([#1920], [#1921], [#1998], [#2040])
67+
- Change constructor `Header::new`, add `Header::with_length`, tests for constructed octet string ([#1931], [#1930])
68+
- Simplify `der_cmp` for `Length` ([#1997])
69+
- Rename variable encoder -> writer and improve example ([#2078])
70+
- Have `PemReader` decode to `Cow::Owned` ([#2094])
71+
- Only sort `SET OF` types with `EncodingRules::Der` ([#2219])
72+
- `SetOf` and `SequenceOf` now require `heapless` feature ([#2220], [#2229])
7173

7274
### Fixed
73-
- fix append in `Encode::encode_to_vec` ([#1760])
74-
- fix derive optional OCTET/BIT STRING on `Option<&[u8]>` ([#1737])
75-
- fix X.680 tag order: compare class and number first ([#1790])
76-
- fix BMPString compatibility in derive macros ([#1793])
77-
- fix Tag::peek_optional for 6-byte and 7+ byte tags ([#1804])
78-
- fix `Header::peek` for 11-byte tag-lengths ([#1828])
79-
- fix panic in `value_cmp`: add `Iterator::size_hint` ([#1830])
80-
- error position tracking improvements ([#1889]) ([#2080]) ([#2079])
81-
- bound `Decode(Value)::Error` on `core::error::Error` ([#2137])
82-
- have `SetOf(Vec)::insert` check for duplicates ([#2217])
75+
- Append in `Encode::encode_to_vec` ([#1760])
76+
- Derive optional OCTET/BIT STRING on `Option<&[u8]>` ([#1737])
77+
- X.680 tag order: compare class and number first ([#1790])
78+
- BMPString compatibility in derive macros ([#1793])
79+
- `Tag::peek_optional` for 6-byte and 7+ byte tags ([#1804])
80+
- `Header::peek` for 11-byte tag-lengths ([#1828])
81+
- Panic in `value_cmp`: add `Iterator::size_hint` ([#1830])
82+
- Error position tracking improvements ([#1889], [#2080], [#2079])
83+
- Bound `Decode(Value)::Error` on `core::error::Error` ([#2137])
84+
- Have `SetOf(Vec)::insert` check for duplicates ([#2217])
8385

8486
### Removed
8587
- `TagNumber::N0..N30` consts ([#1724])
8688
- 256MiB limit on `Length` ([#1726])
87-
- remove generic `<T>` from `Reader::finish` ([#1833])
88-
- `SequenceOf` and `SetOf` ([#2220])
89+
- Generic `<T>` from `Reader::finish` ([#1833])
90+
- Deprecated `SetOf(Vec)::add` methods ([#2232])
91+
- `SequenceRef` lifetime ([#2224])
8992

9093
[#1055]: https://github.com/RustCrypto/formats/pull/1055
9194
[#1321]: https://github.com/RustCrypto/formats/pull/1321
9295
[#1389]: https://github.com/RustCrypto/formats/pull/1389
9396
[#1400]: https://github.com/RustCrypto/formats/pull/1400
9497
[#1401]: https://github.com/RustCrypto/formats/pull/1401
9598
[#1414]: https://github.com/RustCrypto/formats/pull/1414
96-
[#1418]: https://github.com/RustCrypto/formats/pull/1418
9799
[#1451]: https://github.com/RustCrypto/formats/pull/1451
98100
[#1454]: https://github.com/RustCrypto/formats/pull/1454
99101
[#1478]: https://github.com/RustCrypto/formats/pull/1478
@@ -186,6 +188,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
186188
[#2217]: https://github.com/RustCrypto/formats/pull/2217
187189
[#2219]: https://github.com/RustCrypto/formats/pull/2219
188190
[#2220]: https://github.com/RustCrypto/formats/pull/2220
191+
[#2224]: https://github.com/RustCrypto/formats/pull/2224
192+
[#2229]: https://github.com/RustCrypto/formats/pull/2229
193+
[#2232]: https://github.com/RustCrypto/formats/pull/2232
189194

190195
## 0.7.10 (2024-04-18)
191196
### Fixed

der/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "der"
3-
version = "0.8.0-rc.12"
3+
version = "0.8.0"
44
description = """
55
Pure Rust embedded-friendly implementation of the Distinguished Encoding Rules
66
(DER) for Abstract Syntax Notation One (ASN.1) as described in ITU X.690 with

der/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ encountered. There is currently no way to disable these checks.
3939

4040
- Rich support for ASN.1 types used by PKCS/PKIX documents
4141
- Performs DER canonicalization checks at decoding time
42-
- `no_std` friendly: supports "heapless" usage
42+
- `no_std`/`no_alloc` friendly (supports "heapless" usage)
4343
- Optionally supports `alloc` and `std` if desired
4444
- No hard dependencies! Self-contained implementation with optional integrations with the following crates, all of
4545
which are `no_std`/`no_alloc` friendly:

gss-api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ edition = "2024"
1616
rust-version = "1.85"
1717

1818
[dependencies]
19-
der = { version = "0.8.0-rc.10", features = ["oid", "alloc"] }
19+
der = { version = "0.8", features = ["oid", "alloc"] }
2020
spki = "0.8.0-rc.4"
2121
x509-cert = { version = "0.3.0-rc.4", default-features = false }
2222

2323
[dev-dependencies]
24-
der = { version = "0.8.0-rc.10", features = ["oid", "pem", "alloc"] }
24+
der = { version = "0.8", features = ["oid", "pem", "alloc"] }
2525
hex-literal = "1"
2626
x509-cert = { version = "0.3.0-rc.4", default-features = false, features = ["pem"] }
2727

pkcs1/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ edition = "2024"
1616
rust-version = "1.85"
1717

1818
[dependencies]
19-
der = { version = "0.8.0-rc.10", features = ["oid"] }
19+
der = { version = "0.8", features = ["oid"] }
2020
spki = "0.8.0-rc.4"
2121

2222
[dev-dependencies]

pkcs12/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ edition = "2024"
1616
rust-version = "1.85"
1717

1818
[dependencies]
19-
der = { version = "0.8.0-rc.10", features = ["alloc", "derive", "oid"], default-features = false }
19+
der = { version = "0.8", features = ["alloc", "derive", "oid"], default-features = false }
2020
spki = { version = "0.8.0-rc.4", default-features = false }
2121
x509-cert = { version = "0.3.0-rc.4", default-features = false }
2222
const-oid = { version = "0.10", features = ["db"], default-features = false }

0 commit comments

Comments
 (0)