This is a Rust library for parsing and generating ASN.1 data (DER only).
Add asn1
to the [dependencies]
section of your Cargo.toml
:
[dependencies]
asn1 = "0.20"
Builds on Rust 1.65.0 and newer.
rust-asn1
is compatible with #![no_std]
environments:
asn1 = { version = "0.20", default-features = false }
- Updated MSRV to 1.65.0.
- Fixed "perfect derives"
in conjunction with
#[derive(Asn1DefinedByRead)]
and#[derive(Asn1DefinedByWrite)]
. (#506)
- Removed
Writer::{write_explicit_element, write_optional_explicit_element, write_implicit_element, write_optional_implicit_element}
. These can all be better accomplished with theasn1::Explicit
andasn1::Implicit
types.
- Fixed "perfect derives"
in conjunction with
#[implicit]
and#[explicit]
. (#502)
-
GeneralizedTime
has been renamed toX509GeneralizedTime
. 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 oldGeneralizedTime
. (#492) -
#[derive(asn1::Asn1Read)]
and#[derive(asn1::Asn1Write)]
now implement "perfect derives". (#496)