-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMPLICIT/EXPLICIT tags #34
Comments
I am considering adding a field next to the tag attribute: asn1rs/asn1rs-model/src/model/asn.rs Lines 9 to 14 in b6d5f77
Something like pub enum TagExplicitness {
Explicit,
Implicit,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
pub struct Asn<RS: ResolveState = Resolved> {
pub tag: Option<Tag>,
pub tag_explicitness: Option<TagExplicitness>,
pub r#type: Type<RS>,
pub default: Option<RS::ConstType>,
} As well as adding a non-optional field here: Lines 3 to 5 in b6d5f77
Like so: pub trait Constraint {
const TAG: Tag;
const TAG_EXPLICITNESS: TagExplicitness;
} Which could then be used within the impls via Lines 549 to 571 in b6d5f77
@masihyeganeh Does this fully cover the required use case? |
Hello 👋🏻 I am currently implementing COER encoding support on this crate. |
Hi there. I did not start to implement my proposal from above. I am not familiar with the tagging behaviour of ASN.1, because I only use the uPER encoding - so I am very thankful for any kind of support and feedback. Feel free to recommend a better proposal than above, to add yet failing test-cases to fix regarding the tag behaviour or any other kind of PR :) |
Hello there, first of all thanks for the great crate! |
Hi 👋🏻
|
I can see that you have implemented
ITU-T X.680 | ISO/IEC 8824-1, G.2.12.3
here:asn1rs/asn1rs-model/src/gen/rust/walker.rs
Line 861 in 5ab96c1
But can you please implement
ITU-T X.680 | ISO/IEC 8824-1, G.2.12.5
too?There is a good, simple explanation of it in let's encrypt docs.
I'm not sure how it should be after parsing. Now
field.tag
is of kind ofTag
. Maybe it should beExplicitness<Tag>
.For
PER/UPER
, both are the same as current implementation, but forBER/DER
, explicit fields are their own type wrapped with aContextSpecific
. So It parses input bytes differently.Can you please take a look at it?
It is blocking #10.
The text was updated successfully, but these errors were encountered: