PackageTrack
Sign in Get early access

bcder

Handling of data encoded in BER, CER, and DER.

0.7.7 23M downloads/mo #1945 most downloaded on crates.io nlnetlabs/bcder

What this package is like to depend on

Last release 2 months ago

08 Jun 2026

Ships fairly regularly

a new release about every 8 months

Nearly every release is documented

notes for 20 of 21 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

21 releases · first in 2018

2 releases in the last 12 months

see the full history below

Release timeline

21 releases · Oct 2018 to Jun 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 21
  1. 0.7.7 08 Jun 2026
    Release notes

    New

    • Added RestrictedString::take_opt_from. (#90)

    Improvements

    • BIT_STRING parsing now checks that the unused bits are zero in CER and DER modes. (#97)

    Bug fixes

    • Fixed Utf8String potentially accepting invalid UTF-8. (#91 by @sumleo)
    • Fixed a panic in Unsigned::from_bytes when the input is all zero. (#92 by @sumleo)
    • Fixed incorrect bounds check in BitString::bit. (#93 by @sumleo)
    • Added character set validation to FromStr impl for NumericString, PrintableString, and Ia5String. (#95 by @sumleo)
    Open source →
    Release notes

    Released 2026-06-08.

    New

    • Added RestrictedString::take_opt_from. (#90)

    Improvements

    • BIT_STRING parsing now checks that the unused bits are zero in CER and DER modes. (#97)

    Bug fixes

    • Fixed Utf8String potentially accepting invalid UTF-8. (#91 by @sumleo)
    • Fixed a panic in Unsigned::from_bytes when the input is all zero. (#92 by @sumleo)
    • Fixed incorrect bounds check in BitString::bit. (#93 by @sumleo)
    • Added character set validation to FromStr impl for NumericString, PrintableString, and Ia5String. (#95 by @sumleo)
    Open source →
  2. 0.7.6 16 Sep 2025
    Release notes

    New

    • Addded BitString::octet which lets you fetch the octet with the given index. (#88)
    Open source →
    Release notes

    Released 2025-09-16.

    New

    • Addded BitString::octet which lets you fetch the octet with the given index. (#88)
    Open source →
  3. 0.7.5 22 Jan 2025
    Release notes

    Bug fixes

    • Fix compile error on 32 bit systems. (2c8cd0b)
    Open source →
    Release notes

    Released 2025-01-22.

    Bug fixes

    • Fix compile error on 32 bit systems. (2c8cd0b)
    Open source →
  4. 0.7.4 10 Jan 2024
    Release notes

    Other changes

    Open source →
    Release notes

    Released 2024-01-10.

    Other changes

    Open source →
  5. 0.7.3 13 Sep 2023
    Release notes

    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.
    Open source →
    Release notes

    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.
    Open source →
  6. 0.7.2 01 Jun 2023
    Release notes

    New

    • Added an implementation of FromStr for Oid. (#71 by @Outurnate)
    Open source →
    Release notes

    Released 2023-06-01.

    New

    • Added an implementation of FromStr for Oid. (#71 by @Outurnate)
    Open source →
  7. 0.7.1 09 Dec 2022
    Release notes

    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, and RELATIVE-OID-IRI. (#67 by @lvkv)

    Bug fixes

    • Fix Tag::BMP_STRING to UNIVERSAL 30. (#67 by @lvkv)
    Open source →
    Release notes

    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, and RELATIVE-OID-IRI. (#67 by @lvkv)

    Bug fixes

    • Fix Tag::BMP_STRING to UNIVERSAL 30. (#67 by @lvkv)
    Open source →
  8. 0.7.0 18 Jul 2022
    Release notes

    Breaking Changes

    • Redesign error handling in decode module (#65):
      • three error types, Source::Error, ContentError, and DecodeError, for data fetching errors, syntax errors, and a combination of these,
        respectively;
      • new trait IntoSource to convert a type into its Source implementation;
      • Source::advance now panics if advancing past the end of seen data.
    Open source →
    Release notes

    Released 2022-07-18.

    Breaking Changes

    • Redesign error handling in decode module (#65):
      • three error types, Source::Error, ContentError, and DecodeError, for data fetching errors, syntax errors, and a combination of these, respectively;
      • new trait IntoSource to convert a type into its Source implementation;
      • Source::advance now panics if advancing past the end of seen data.
    Open source →
  9. 0.6.1 29 Oct 2021
    Release notes

    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)
    Open source →
    Release notes

    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)
    Open source →
  10. 0.6.0 04 Jan 2021
    Release notes

    Breaking Changes

    • Minimum supported Rust version is now 1.42. (#56)
    • Upgrade bytes to 1.0. (#57)
    Open source →
    Release notes

    Released 2021-01-04.

    Breaking Changes

    • Minimum supported Rust version is now 1.42. (#56)
    • Upgrade bytes to 1.0. (#57)
    Open source →
  11. 0.5.1 04 Jan 2021
    Release notes

    Released 2021-01-04.

    Bug Fixes

    • Fix oid::Iter to actually iterate over the components. (#50)
    Open source →
  12. 0.5.0 05 Mar 2020
    Release notes

    Breaking

    • Move extending a Captured to an explicit CapturedBuilder. This becomes necessary with bytes 0.5. Both these types now reside in the module captured with Captured re-exported at crate level. (#46, #47)

    Dependencies

    Open source →
  13. 0.4.2 11 Feb 2020
    Release notes

    Bug Fixes

    Open source →
  14. 0.4.1 03 Dec 2019
    Release notes

    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)
    Open source →
  15. 0.4.0 09 Sep 2019
    Release notes

    Breaking

    • Dropped RestrictedString::to_string and implemented it via Display instead. Therefore, you will have to use 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).
    Open source →
  16. 0.3.1 08 Jul 2019
    Release notes

    Bug Fixes

    • Fix a lifetime warning from the new borrow checker. (#27)
    • Build on 32 bit systems. (#29)

    Other Changes

    • Switch to Rust edition 2018.
    Open source →
  17. 0.3.0 31 May 2019
    Release notes

    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 and Integer and Unsigned. (#23)
    • RestrictedString::into_bytes (#24)

    Other Changes

    • The xerr! macro now prints a backtrace with the extra-debug feature enabled instead of panicking. (#21)
    Open source →
  18. 0.2.2 09 Sep 2019

    Nothing published for this version

  19. 0.2.1 06 Mar 2019
    Release notes

    New

    • Add BitString::encode_slice and encode_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)
    Open source →
  20. 0.2.0 14 Feb 2019
    Release notes

    Breaking Changes

    • Drop use of failure crate. Error types now provide a Display implementation only. [(#15)]

    • PrimitiveContent’s methods take self instead of &self. This avoids the lifetime argument in Primitive, its encoder. (#7)

    • For all provided type, change encode and encode_as methods to take self by value and introduce encode_ref and encode_ref_as that take self by reference. (#12)

    • RestrictedString::from_str replaced by an implementation of the FromStr trait. (#13)

    New

    • encode::Values implemented for tuples of up to twelve elements. (#9)

    • OctetString::encode_slice and encode_slice_as: allows encoding a bytes slice as an octet string without going through making an OctetString first.

    • encode::Slice wraps a slice of values encoding encode::Values and provides an encoder for it. (#11)

    • new functions: encode::slice and encode::iter as shortcuts for the respective associated functions. (#11)

    • OctetString::is_empty (#13), OctetString::into_bytes (#14).

    Open source →
  21. 0.1.0 23 Oct 2018
    Release notes

    Initial public release.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive