-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Description
So I was just trying to change my application from my self-made support for private tags to the upstream support in the release candidates. (Thanks @tarcieri and @turbocool3r for following through on that).
In my code two things broke, that might not be intentional. So this example is a minimized version of my issues:
use der::{AnyRef, Decode, FixedTag, Sequence, oid::ObjectIdentifier};
#[derive(Debug, Sequence)]
pub struct SomeType<'a> {
pub oid: ObjectIdentifier,
#[asn1(context_specific = "0", tag_mode = "IMPLICIT")]
pub data: AnyRef<'a>,
}
fn main() {
let _ = ObjectIdentifier::TAG;
let bytes = b"\x30\x12\x06\x07\x2a\x86\x48\xce\x3d\x02\x01\x80\x07\x63\x6f\x6e\x74\x65\x6e\x74";
let decoded = SomeType::from_der(bytes).unwrap();
println!("{:02x?}", decoded.data.value());
}
Metadata
Metadata
Assignees
Labels
No labels