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