1# Changelog
2All notable changes to this project will be documented in this file.
3
4The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7## 0.7.9 (2024-04-01)
8### Changed
9- ignore RUSTSEC-2023-0071 (backport [#1276])
10- make sure der is comptatible with potential language breaking changed (backport [#1374])
11
12[#1276]: https://github.com/RustCrypto/formats/pull/1276
13[#1374]: https://github.com/RustCrypto/formats/pull/1374
14
15## 0.7.8 (2023-08-07)
16### Added
17- `bytes` feature ([#1156])
18- impl `RefToOwned`/`OwnedToRef` for `&[u8]`/`Box<[u8]>` ([#1188])
19- `BmpString` ([#1164])
20
21### Changed
22- no-panic cleanup ([#1169])
23- Bump `der_derive` dependency to v0.7.2 ([#1192])
24
25[#1156]: https://github.com/RustCrypto/formats/pull/1156
26[#1164]: https://github.com/RustCrypto/formats/pull/1164
27[#1169]: https://github.com/RustCrypto/formats/pull/1169
28[#1188]: https://github.com/RustCrypto/formats/pull/1188
29[#1192]: https://github.com/RustCrypto/formats/pull/1192
30
31## 0.7.7 (2023-06-29)
32### Added
33- `TryFrom<String>` impl for strings based on `StrOwned` ([#1064])
34
35[#1064]: https://github.com/RustCrypto/formats/pull/1064
36
37## 0.7.6 (2023-05-16)
38### Added
39- `SetOfVec::{extend, from_iter}` methods ([#1065])
40- `SetOf(Vec)::{insert, insert_ordered}` methods ([#1067])
41
42### Changed
43- Deprecate `SetOf(Vec)::add` ([#1067])
44
45### Fixed
46- Off-by-one error in `BMPString` tag ([#1037])
47- Handling of non-unique items in `SetOf`(Vec) ([#1066])
48
49[#1037]: https://github.com/RustCrypto/formats/pull/1037
50[#1065]: https://github.com/RustCrypto/formats/pull/1065
51[#1066]: https://github.com/RustCrypto/formats/pull/1066
52[#1067]: https://github.com/RustCrypto/formats/pull/1067
53
54## 0.7.5 (2023-04-24)
55### Added
56- adds support for `DateTime::INFINITY` ([#1026])
57
58[#1026]: https://github.com/RustCrypto/formats/pull/1026
59
60## 0.7.4 (2023-04-19)
61### Added
62- `Decode` and `Encode` impls for `PhantomData` ([#1009])
63- `ValueOrd` and `DerOrd` impls for `PhantomData` ([#1012])
64
65### Changed
66- Bump `hex-literal` dependency to v0.4.1 ([#999])
67- Bump `der_derive` dependency to v0.7.1 ([#1016])
68
69[#1009]: https://github.com/RustCrypto/formats/pull/1009
70[#1012]: https://github.com/RustCrypto/formats/pull/1012
71[#1016]: https://github.com/RustCrypto/formats/pull/1016
72
73## 0.7.3 (2023-04-06)
74### Added
75- `UtcTime::MAX_YEAR` associated constant ([#989])
76
77[#989]: https://github.com/RustCrypto/formats/pull/989
78
79## 0.7.2 (2023-04-04)
80### Added
81- Expose `NestedReader ([#925])
82- `From<ObjectIdentifier>` impl for `Any` ([#965])
83- `Any::null` helper ([#969])
84- `Any::encode_from` ([#976])
85
86[#925]: https://github.com/RustCrypto/formats/pull/925
87[#965]: https://github.com/RustCrypto/formats/pull/965
88[#969]: https://github.com/RustCrypto/formats/pull/969
89[#976]: https://github.com/RustCrypto/formats/pull/976
90
91## 0.7.1 (2023-03-07)
92### Changed
93- Make `zeroize`'s `alloc` feature conditional ([#920])
94
95[#920]: https://github.com/RustCrypto/formats/pull/920
96
97## 0.7.0 (2023-02-26) [YANKED]
98### Added
99- `OwnedtoRef`/`RefToOwned` traits; MSRV 1.65 ([#797])
100- `OctetStringRef::decode_into` ([#817])
101- `Int` and `IntRef` types ([#823])
102- `IndefiniteLength` type ([#830])
103- `Any::value` accessor ([#833])
104- Buffered PEM reader ([#839])
105- `OctetString::into_bytes` ([#845])
106- Blanket impls on `Box<T>` for `DecodeValue`, `EncodeValue`, and `Sequence` ([#860])
107
108### Changed
109- Rename `UIntRef` => `UintRef` ([#786])
110- Replace use of `dyn Writer` with `impl Writer` ([#828])
111- Rename `AnyRef::decode_into` -> `::decode_as` ([#829])
112- Bump `pem-rfc7468` dependency to v0.7 ([#894])
113- Rename `Encode::to_vec` => `::to_der` ([#898])
114
115### Removed
116- `Sequence::fields` method ([#828])
117- Inherent `AnyRef` decoding methods ([#829])
118
119[#786]: https://github.com/RustCrypto/formats/pull/786
120[#797]: https://github.com/RustCrypto/formats/pull/797
121[#817]: https://github.com/RustCrypto/formats/pull/817
122[#823]: https://github.com/RustCrypto/formats/pull/823
123[#828]: https://github.com/RustCrypto/formats/pull/828
124[#829]: https://github.com/RustCrypto/formats/pull/829
125[#830]: https://github.com/RustCrypto/formats/pull/830
126[#833]: https://github.com/RustCrypto/formats/pull/833
127[#839]: https://github.com/RustCrypto/formats/pull/839
128[#845]: https://github.com/RustCrypto/formats/pull/845
129[#860]: https://github.com/RustCrypto/formats/pull/860
130[#894]: https://github.com/RustCrypto/formats/pull/894
131[#898]: https://github.com/RustCrypto/formats/pull/898
132
133## 0.6.1 (2022-12-05)
134### Added
135- Rudimentary implementation of `TeletexString` and `VideotexString` ([#691])
136- Impl `ValueOrd` for `FlagSet<T>` and `UIntRef` ([#723])
137
138### Changed
139- Eliminate some boilerplate code by using `Deref` ([#697])
140
141[#691]: https://github.com/RustCrypto/formats/pull/691
142[#697]: https://github.com/RustCrypto/formats/pull/697
143[#723]: https://github.com/RustCrypto/formats/pull/723
144
145## 0.6.0 (2022-05-08)
146### Added
147- Impl `ValueOrd` for `SetOf` and `SetOfVec` ([#362])
148- `SequenceRef` type ([#374])
149- Support for `SetOf` sorting on heapless `no_std` targets ([#401])
150- Support for mapping `BitString` to/from a `FlagSet` ([#412])
151- `DecodeOwned` marker trait ([#529])
152- Support for the ASN.1 `REAL` type ([#346])
153- `DecodePem` and `EncodePem` traits ([#571])
154- `Document` and `SecretDocument` types ([#571])
155- `EncodeRef`/`EncodeValueRef` wrapper types ([#604])
156- `Writer` trait ([#605])
157- `Reader` trait ([#606])
158- Streaming on-the-fly `PemReader` and `PemWriter` ([#618], [#636])
159- Owned `BitString` ([#636])
160- Owned `Any` and `OctetString` types ([#640])
161
162### Changed
163- Pass `Header` to `DecodeValue` ([#392])
164- Bump `const-oid` dependency to v0.9 ([#507])
165- Renamed `Decodable`/`Encodable` => `Decode`/`Encode` ([#523])
166- Enable arithmetic, casting, and panic `clippy` lints ([#556], [#579])
167- Use `&mut dyn Writer` as output for `Encode::encode` and `EncodeValue::encode_value` ([#611])
168- Bump `pem-rfc7468` dependency to v0.6 ([#620])
169- Use `Reader<'a>` as input for `Decode::decode` and `DecodeValue::decode_value` ([#633])
170- Renamed `Any` => `AnyRef` ([#637])
171- Renamed `BitString` => `BitStringRef` ([#637])
172- Renamed `Ia5String` => `Ia5StringRef` ([#637])
173- Renamed `OctetString` => `OctetStringRef` ([#637])
174- Renamed `PrintableString` => `PrintableStringRef` ([#637])
175- Renamed `Utf8String` => `Utf8StringRef` ([#637])
176- Renamed `UIntBytes` => `UIntRef` ([#637])
177- Renamed `Decoder` => `SliceReader` ([#651])
178- Renamed `Encoder` => `SliceWriter` ([#651])
179
180### Fixed
181- Handling of oversized unsigned `INTEGER` inputs ([#447])
182
183### Removed
184- `bigint` feature ([#344])
185- `OrdIsValueOrd` trait ([#359])
186- `Document` trait ([#571])
187- `OptionalRef` ([#604])
188- Decode-time SET OF ordering checks ([#625])
189
190[#344]: https://github.com/RustCrypto/formats/pull/344
191[#346]: https://github.com/RustCrypto/formats/pull/346
192[#359]: https://github.com/RustCrypto/formats/pull/359
193[#362]: https://github.com/RustCrypto/formats/pull/362
194[#374]: https://github.com/RustCrypto/formats/pull/374
195[#392]: https://github.com/RustCrypto/formats/pull/392
196[#401]: https://github.com/RustCrypto/formats/pull/401
197[#412]: https://github.com/RustCrypto/formats/pull/412
198[#447]: https://github.com/RustCrypto/formats/pull/447
199[#507]: https://github.com/RustCrypto/formats/pull/507
200[#523]: https://github.com/RustCrypto/formats/pull/523
201[#529]: https://github.com/RustCrypto/formats/pull/529
202[#556]: https://github.com/RustCrypto/formats/pull/556
203[#571]: https://github.com/RustCrypto/formats/pull/571
204[#579]: https://github.com/RustCrypto/formats/pull/579
205[#604]: https://github.com/RustCrypto/formats/pull/604
206[#605]: https://github.com/RustCrypto/formats/pull/605
207[#606]: https://github.com/RustCrypto/formats/pull/606
208[#611]: https://github.com/RustCrypto/formats/pull/611
209[#618]: https://github.com/RustCrypto/formats/pull/618
210[#620]: https://github.com/RustCrypto/formats/pull/620
211[#625]: https://github.com/RustCrypto/formats/pull/625
212[#633]: https://github.com/RustCrypto/formats/pull/633
213[#636]: https://github.com/RustCrypto/formats/pull/636
214[#637]: https://github.com/RustCrypto/formats/pull/637
215[#640]: https://github.com/RustCrypto/formats/pull/640
216[#651]: https://github.com/RustCrypto/formats/pull/651
217
218## 0.5.1 (2021-11-17)
219### Added
220- `Any::NULL` constant ([#226])
221
222[#226]: https://github.com/RustCrypto/formats/pull/226
223
224## 0.5.0 (2021-11-15) [YANKED]
225### Added
226- Support for `IMPLICIT` mode `CONTEXT-SPECIFIC` fields ([#61])
227- `DecodeValue`/`EncodeValue` traits ([#63])
228- Expose `DateTime` through public API ([#75])
229- `SEQUENCE OF` support for `[T; N]` ([#90])
230- `SequenceOf` type ([#95])
231- `SEQUENCE OF` support for `Vec` ([#96])
232- `Document` trait ([#117])
233- Basic integration with `time` crate ([#129])
234- `Tag::NumericString` ([#132])
235- Support for unused bits to `BitString` ([#141])
236- `Decoder::{peek_tag, peek_header}` ([#142])
237- Type hint in `encoder `sequence` method ([#147])
238- `Tag::Enumerated` ([#153])
239- `ErrorKind::TagNumberInvalid` ([#156])
240- `Tag::VisibleString` and `Tag::BmpString` ([#160])
241- Inherent constants for all valid `TagNumber`s ([#165])
242- `DerOrd` and `ValueOrd` traits ([#190])
243- `ContextSpecificRef` type ([#199])
244
245### Changed
246- Make `ContextSpecific` generic around an inner type ([#60])
247- Removed `SetOf` trait; rename `SetOfArray` => `SetOf` ([#97])
248- Rename `Message` trait to `Sequence` ([#99])
249- Make `GeneralizedTime`/`UtcTime` into `DateTime` newtypes ([#102])
250- Rust 2021 edition upgrade; MSRV 1.56 ([#136])
251- Replace `ErrorKind::Truncated` with `ErrorKind::Incomplete` ([#143])
252- Rename `ErrorKind::UnknownTagMode` => `ErrorKind::TagModeUnknown` ([#155])
253- Rename `ErrorKind::UnexpectedTag` => `ErrorKind::TagUnexpected` ([#155])
254- Rename `ErrorKind::UnknownTag` => `ErrorKind::TagUnknown` ([#155])
255- Consolidate `ErrorKind::{Incomplete, Underlength}` ([#157])
256- Rename `Tagged` => `FixedTag`; add new `Tagged` trait ([#189])
257- Use `DerOrd` for `SetOf*` types ([#200])
258- Switch `impl From<BitString> for &[u8]` to `TryFrom` ([#203])
259- Bump `crypto-bigint` dependency to v0.3 ([#215])
260- Bump `const-oid` dependency to v0.7 ([#216])
261- Bump `pem-rfc7468` dependency to v0.3 ([#217])
262- Bump `der_derive` dependency to v0.5 ([#221])
263
264### Removed
265- `Sequence` struct ([#98])
266- `Tagged` bound on `ContextSpecific::decode_implicit` ([#161])
267- `ErrorKind::DuplicateField` ([#162])
268
269[#60]: https://github.com/RustCrypto/formats/pull/60
270[#61]: https://github.com/RustCrypto/formats/pull/61
271[#63]: https://github.com/RustCrypto/formats/pull/63
272[#75]: https://github.com/RustCrypto/formats/pull/75
273[#90]: https://github.com/RustCrypto/formats/pull/90
274[#95]: https://github.com/RustCrypto/formats/pull/95
275[#96]: https://github.com/RustCrypto/formats/pull/96
276[#97]: https://github.com/RustCrypto/formats/pull/97
277[#98]: https://github.com/RustCrypto/formats/pull/98
278[#99]: https://github.com/RustCrypto/formats/pull/99
279[#102]: https://github.com/RustCrypto/formats/pull/102
280[#117]: https://github.com/RustCrypto/formats/pull/117
281[#129]: https://github.com/RustCrypto/formats/pull/129
282[#132]: https://github.com/RustCrypto/formats/pull/132
283[#136]: https://github.com/RustCrypto/formats/pull/136
284[#141]: https://github.com/RustCrypto/formats/pull/141
285[#142]: https://github.com/RustCrypto/formats/pull/142
286[#143]: https://github.com/RustCrypto/formats/pull/143
287[#147]: https://github.com/RustCrypto/formats/pull/147
288[#153]: https://github.com/RustCrypto/formats/pull/153
289[#155]: https://github.com/RustCrypto/formats/pull/155
290[#156]: https://github.com/RustCrypto/formats/pull/156
291[#157]: https://github.com/RustCrypto/formats/pull/157
292[#160]: https://github.com/RustCrypto/formats/pull/160
293[#161]: https://github.com/RustCrypto/formats/pull/161
294[#162]: https://github.com/RustCrypto/formats/pull/162
295[#165]: https://github.com/RustCrypto/formats/pull/165
296[#189]: https://github.com/RustCrypto/formats/pull/189
297[#190]: https://github.com/RustCrypto/formats/pull/190
298[#199]: https://github.com/RustCrypto/formats/pull/199
299[#200]: https://github.com/RustCrypto/formats/pull/200
300[#203]: https://github.com/RustCrypto/formats/pull/203
301[#215]: https://github.com/RustCrypto/formats/pull/215
302[#216]: https://github.com/RustCrypto/formats/pull/216
303[#217]: https://github.com/RustCrypto/formats/pull/217
304[#221]: https://github.com/RustCrypto/formats/pull/221
305
306## 0.4.5 (2021-12-01)
307### Fixed
308- Backport [#147] type hint fix for WASM platforms to 0.4.x
309
310## 0.4.4 (2021-10-06)
311### Removed
312- Accidentally checked-in `target/` directory ([#66])
313
314[#66]: https://github.com/RustCrypto/formats/pull/66
315
316## 0.4.3 (2021-09-15)
317### Added
318- `Tag::unexpected_error` ([#33])
319
320[#33]: https://github.com/RustCrypto/formats/pull/33
321
322## 0.4.2 (2021-09-14)
323### Changed
324- Moved to `formats` repo ([#2])
325
326### Fixed
327- ASN.1 `SET` type now flagged with the constructed bit
328
329[#2]: https://github.com/RustCrypto/formats/pull/2
330
331## 0.4.1 (2021-08-08)
332### Fixed
333- Encoding `UTCTime` for dates with `20xx` years
334
335## 0.4.0 (2021-06-07)
336### Added
337- `TagNumber` type
338- Const generic integer de/encoders with support for all of Rust's integer
339  primitives
340- `crypto-bigint` support
341- `Tag` number helpers
342- `Tag::octet`
343- `ErrorKind::Value` helpers
344- `SequenceIter`
345
346### Changed
347- Bump `const-oid` crate dependency to v0.6
348- Make `Tag` structured
349- Namespace ASN.1 types in `asn1` module
350- Refactor context-specific field decoding
351- MSRV 1.51
352- Rename `big-uint` crate feature to `bigint`
353- Rename `BigUInt` to `UIntBytes`
354- Have `Decoder::error()` return an `Error`
355
356### Removed
357- Deprecated methods replaced by associated constants
358
359## 0.3.5 (2021-05-24)
360### Added
361- Helper methods for context-specific fields
362- `ContextSpecific` field wrapper
363- Decoder position tracking for errors during `Any<'a>` decoding
364
365### Fixed
366- `From` conversion for `BitString` into `Any`
367
368## 0.3.4 (2021-05-16)
369### Changed
370- Support `Length` of up to 1 MiB
371
372## 0.3.3 (2021-04-15)
373### Added
374- `Length` constants
375
376### Changed
377- Deprecate `const fn` methods replaced by `Length` constants
378
379## 0.3.2 (2021-04-15)
380### Fixed
381- Non-critical bug allowing `Length` to exceed the max invariant
382
383## 0.3.1 (2021-04-01) [YANKED]
384### Added
385- `PartialOrd` + `Ord` impls to all ASN.1 types
386
387## 0.3.0 (2021-03-22) [YANKED]
388### Added
389- Impl `Decode`/`Encoded`/`Tagged` for `String`
390- `Length::one` and `Length::for_tlv`
391- `SET OF` support with `SetOf` trait and `SetOfRef`
392
393### Changed
394- Rename `Decodable::from_bytes` => `Decodable::from_der`
395- Separate `sequence` and `message`
396- Rename `ErrorKind::Oid` => `ErrorKind::MalformedOid`
397- Auto-derive `From` impls for variants when deriving `Choice`
398- Make `Length` use `u32` internally
399- Make `Sequence` constructor private
400- Bump `const_oid` to v0.5
401- Bump `der_derive` to v0.3
402
403### Removed
404- Deprecated methods
405- `BigUIntSize`
406
407## 0.2.10 (2021-02-28)
408### Added
409- Impl `From<ObjectIdentifier>` for `Any`
410
411### Changed
412- Bump minimum `const-oid` dependency to v0.4.4
413
414## 0.2.9 (2021-02-24)
415### Added
416- Support for `IA5String`
417
418## 0.2.8 (2021-02-22)
419### Added
420- `Choice` trait
421
422## 0.2.7 (2021-02-20)
423### Added
424- Export `Header` publicly
425- Make `Encoder::reserve` public
426
427## 0.2.6 (2021-02-19)
428### Added
429- Make the unit type an encoding of `NULL`
430
431## 0.2.5 (2021-02-18)
432### Added
433- `ErrorKind::UnknownOid` variant
434
435## 0.2.4 (2021-02-16)
436### Added
437- `Any::is_null` method
438
439### Changed
440- Deprecate `Any::null` method
441
442## 0.2.3 (2021-02-15)
443### Added
444- Additional `rustdoc` documentation
445
446## 0.2.2 (2021-02-12)
447### Added
448- Support for `UTCTime` and `GeneralizedTime`
449
450## 0.2.1 (2021-02-02)
451### Added
452- Support for `PrintableString` and `Utf8String`
453
454## 0.2.0 (2021-01-22)
455### Added
456- `BigUInt` type
457- `i16` support
458- `u8` and `u16` support
459- Integer decoder helper methods
460
461### Fixed
462- Handle leading byte of `BIT STRING`s
463
464## 0.1.0 (2020-12-21)
465- Initial release
466