45 releases (17 breaking)

0.21.0 Mar 10, 2025
0.20.0 Nov 21, 2024
0.19.0 Nov 17, 2024
0.16.2 Jun 2, 2024
0.6.0 Jul 17, 2021

#41 in #asn1

Download history 66124/week @ 2024-12-13 42808/week @ 2024-12-20 38982/week @ 2024-12-27 64514/week @ 2025-01-03 64031/week @ 2025-01-10 65222/week @ 2025-01-17 65683/week @ 2025-01-24 72833/week @ 2025-01-31 75449/week @ 2025-02-07 69379/week @ 2025-02-14 78522/week @ 2025-02-21 71582/week @ 2025-02-28 74335/week @ 2025-03-07 67909/week @ 2025-03-14 64775/week @ 2025-03-21 52906/week @ 2025-03-28

273,247 downloads per month
Used in 8 crates (via asn1)

BSD-3-Clause

39KB
960 lines

rust-asn1

Dependency Status Documentation

This is a Rust library for parsing and generating ASN.1 data (DER only).

Installation

Add asn1 to your Cargo.toml:

$ cargo add asn1

Builds on Rust 1.65.0 and newer.

rust-asn1 is compatible with #![no_std] environments:

$ cargo add asn1 --no-default-features

Changelog

[0.21.0]

Changes

  • Updated MSRV to 1.65.0.

Fixes

  • Fixed "perfect derives" in conjunction with #[derive(Asn1DefinedByRead)] and #[derive(Asn1DefinedByWrite)]. (#506)

[0.20.0]

🚨 Breaking changes

  • Removed Writer::{write_explicit_element, write_optional_explicit_element, write_implicit_element, write_optional_implicit_element}. These can all be better accomplished with the asn1::Explicit and asn1::Implicit types.

Fixes

[0.19.0]

🚨 Breaking changes

  • GeneralizedTime has been renamed to X509GeneralizedTime. The type does not allow fractional seconds, however this restriction is not actually a DER rule, it is specific to X.509. (#494)

  • GeneralizedTime is a new type that accepts fractional seconds replacing the old GeneralizedTime. (#492)

  • #[derive(asn1::Asn1Read)] and #[derive(asn1::Asn1Write)] now implement "perfect derives". (#496)

Dependencies

~205–640KB
~15K SLoC