-
Notifications
You must be signed in to change notification settings - Fork 57
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
compareSchema returns false
for constructed OctetString
#56
Comments
false
for constructed OctetString
Use Choice. |
RFC 5652 seys that
I know that it's possible to use
What if don't throw validation error for objects which allow subitems and use
And it would be nice if constructed OctetString could normalize items and return concatenated arrays without ASN tags |
The ASN1js introduced a difference between constricted and simple form of OCTET STRING, as well as BINARY STRING. In fact since schema comparison function count them as a different types then, accordingly to ASN.1 standard in ASN.1 schema we need to have CHOICE. So no violations of ASN.1 standard here at all. Not sure I understood your sentence about "allow subitems and use isConstructed field" - it is already done in ASN1js. What you describing could be made in ASN1js using REPEATED special class, check PKIjs for examples. As for "return concatenated arrays": you could use this block of code for this purpose. As far I as remember it is the only place in entire PKI which requires to have "concatenated arrays". Making a special API function for this one case is really a bad idea. |
Oh, just got into my mind: accordingly to ASN.1 standard the "value" of constructed OCTET STRING could be another constructed OCTET STRING. Just for your information. |
ASN1.js module uses strict verification for
isConstructed
property in schema. How can I create a schema which supports both cases forOCTET STRING
type?The text was updated successfully, but these errors were encountered: