46 releases (17 breaking)

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

#66 in #asn-1

Download history 64270/week @ 2025-01-12 64289/week @ 2025-01-19 67962/week @ 2025-01-26 71589/week @ 2025-02-02 76008/week @ 2025-02-09 69185/week @ 2025-02-16 77880/week @ 2025-02-23 73925/week @ 2025-03-02 73825/week @ 2025-03-09 64959/week @ 2025-03-16 64916/week @ 2025-03-23 63239/week @ 2025-03-30 62702/week @ 2025-04-06 61200/week @ 2025-04-13 57625/week @ 2025-04-20 55289/week @ 2025-04-27

241,751 downloads per month
Used in 8 crates (via asn1)

BSD-3-Clause

42KB
1K SLoC

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

~195–620KB
~15K SLoC