-
Notifications
You must be signed in to change notification settings - Fork 135
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
Question about ASN1 Tag types used in CRMF #1206
Comments
CC: @carl-wallace |
It looks like the Looking at RFC4211 § 5 I don't see anything to indicate these fields should be |
Also I am not very familiar with ASN1 Tag DER decode/encode, I am using Appropriate if anyone could help ask my confusion above. If they supposed to be IMPLICIT, i could help to make the PR. |
The reason is that Name is defined as a CHOICE. It looks weird but I am fairly certain you are not going to get the desired result if you change it. There are tests again OpenSSL generated requests and I have interoperated with a CA using this crate as currently defined. |
It might be good to add some documentation to that effect |
OK. I will look up the appropriate ASN.1 reference on tagged CHOICES and push a comment later this week. |
Jumping into the convo here... I took a closer peek at the latest X.680 spec. And in rule 31.2.7, I found this:
This matches what Carl was saying about Name ::= CHOICE { -- only one possibility for now --
rdnSequence RDNSequence } (copied from RFC 5912) And in fact, rule 31.2.9 further solidifies this:
I know @carl-wallace has already created PR #1226 to address this issue, and it's been merged. I'd figured I'd still comment here though, to inform others and (more importantly) myself. I suppose I could open a new PR to update the comment that Carl made (since he only referenced rule 31.2.6 in his comment), but that's probably overkill 😉 EDIT: this isn't to say that rule 31.2.6 doesn't apply. I just personally found rules 31.2.7 and 31.2.9 to be more explicit in describing why we need explicit tagging for the |
On a side note, we can probably close this issue now :) |
I opted not to use those words on purpose. I don't find the "untagged choice" verbiage to be helpful and find "not needed during transfer" to be more helpful, if still vague. To each his own. |
You do have a point; after writing my last comment, I spent another 30 minutes or so trying to figure out what a "untagged choice" was to begin with 🤡 |
From source code, such as CertTemplate, tag type used for some fields are
EXPLICIT
, why they are inconsistent?From RFC: https://datatracker.ietf.org/doc/html/rfc4211#appendix-B
All tags seem default to IMPLICIT in CRMF types, see:
The text was updated successfully, but these errors were encountered: