Breaking changes
New
Bug fixes
Other changes
Released 2025-01-22.
Bug fixes
- Fix compile error on 32 bit systems. (2c8cd0b)
Released 2024-01-10.
Other changes
- Update smallvec dependency to at least 1.6.1 due to a security advisory RUSTSEC-2021-0003. (#77)
Release 2023-09-13.
This release fixes a number of decoding issues that can lead to panics on invalid input data. They have been assigned CVE-2023-39914.
Bug fixes
- Fixes various decoding that lead to a panic on invalid data.
Specifically:
- error out rather than panic when a nested value has a greater length than allowed by the outer value,
- check that there is enough data available before skipping over a primitive value’s content,
- check that enough data is available before trying to parse a tag value,
- check for correct encoding of bit strings: don’t allow the number of unused bits to be greater than 7 and that they are zero for an empty bit string,
- check for correct encoding of object identifiers: they cannot be empty and the last byte must have bit 7 cleared.
Released 2023-06-01.
New
- Added an implementation of
FromStr
forOid
. (#71 by @Outurnate)
Released 2022-12-09.
New
- Added a number of missing well-defined tags as
Tag
constants, specifically:CHARACTER STRING
,TIME
,DATA
,TIME_OF_DAY
,DATE_TIME
,DURATION
,OID-IRI
, andRELATIVE-OID-IRI
. (#67 by @lvkv)
Bug fixes
Released 2022-07-18.
Breaking Changes
- Redesign error handling in
decode
module (#65):- three error types,
Source::Error
,ContentError
, andDecodeError
, for data fetching errors, syntax errors, and a combination of these, respectively; - new trait
IntoSource
to convert a type into itsSource
implementation; Source::advance
now panics if advancing past the end of seen data.
- three error types,
Released 2012-10-29.
New
int::Unsigned
can now be created from an arbitrary length big-endian representation of an unsigned integer. (#59)- Add
OctetString::take_opt_from
. (#61)
Released 2021-01-04.
Breaking Changes
Released 2021-01-04.
Bug Fixes
- Fix
oid::Iter
to actually iterate over the components. (#50)
Breaking
- Move extending a
Captured
to an explicitCapturedBuilder
. This becomes necessary with bytes 0.5. Both these types now reside in the modulecaptured
withCaptured
re-exported at crate level. (#46, #47)
Dependencies
- Upgrade bytes to 0.5. (#43, thanks to @Fabian-Gruenbichler)
- Upgrade smallvec to 1.1. (#48)
Bug Fixes
- Fix handling of incomplete multi-byte tags. (#44, based on #41 by @dovreshef)
New
- Support for multi-byte tags with tag numbers of up to
0x1F_FFFF
. (#37, thanks to by @dovreshef)
Bug Fixes
- Fix encoding of signed builtin integer (
i8
,i16
, …). (#39)
Breaking
- Dropped
RestrictedString::to_string
and implemented it viaDisplay
instead. Therefore, you will have touse std::fmt::Display
to get it back. (#33)
Bug Fixes
- Safely decode deeply nested BER such as octet strings. Decoding such types now uses an allocated artificial stack and will thus not overflow the regular one. (#30)
Miscellaneous
- Dropped dependency on
derive_more
for fewer dependencies and faster compiling. (#32, thanks to @nocduro).
Bug Fixes
Other Changes
- Switch to Rust edition 2018.
Breaking
- The minimum supported Rust version is now 1.34.0. (#22)
New
- New methods for checking the class and number on
Tag
. (#20) - Implement
TryFrom
for builtin integers andInteger
andUnsigned
. (#23) RestrictedString::into_bytes
(#24)
Other Changes
- The
xerr!
macro now prints a backtrace with theextra-debug
feature enabled instead of panicking. (#21)
New
- Add
BitString::encode_slice
andencode_slice_as
. (#17)
Bug Fixes
- Fix incorrect encoding of primitive unsigned integers for values with a number of leading zero bits divisible by eight. (#16)
- Fix the mkoid tool to correctly encode large subidentifiers. (#18)
Breaking Changes
-
Drop use of failure crate. Error types now provide a
Display
implementation only. [(#15)] -
PrimitiveContent
’s methods takeself
instead of&self
. This avoids the lifetime argument inPrimitive
, its encoder. (#7) -
For all provided type, change
encode
andencode_as
methods to take self by value and introduceencode_ref
andencode_ref_as
that take self by reference. (#12) -
RestrictedString::from_str
replaced by an implementation of theFromStr
trait. (#13)
New
-
encode::Values
implemented for tuples of up to twelve elements. (#9) -
OctetString::encode_slice
andencode_slice_as
: allows encoding a bytes slice as an octet string without going through making anOctetString
first. -
encode::Slice
wraps a slice of values encodingencode::Values
and provides an encoder for it. (#11) -
new functions:
encode::slice
andencode::iter
as shortcuts for the respective associated functions. (#11)
Initial public release.