50 releases (19 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.1.0 Jul 21, 2015

#37 in Cryptography

Download history 59569/week @ 2024-12-01 63309/week @ 2024-12-08 66460/week @ 2024-12-15 37726/week @ 2024-12-22 41014/week @ 2024-12-29 68299/week @ 2025-01-05 64278/week @ 2025-01-12 64342/week @ 2025-01-19 67983/week @ 2025-01-26 71602/week @ 2025-02-02 76032/week @ 2025-02-09 69176/week @ 2025-02-16 77915/week @ 2025-02-23 73994/week @ 2025-03-02 73925/week @ 2025-03-09 61554/week @ 2025-03-16

292,150 downloads per month
Used in 7 crates

BSD-3-Clause

195KB
5K 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

~210–650KB
~15K SLoC