Skip to content
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

Parse error on sequence constraint #59

Open
yodang opened this issue Oct 21, 2024 · 4 comments
Open

Parse error on sequence constraint #59

yodang opened this issue Oct 21, 2024 · 4 comments

Comments

@yodang
Copy link

yodang commented Oct 21, 2024

Hello !

I have encountered a parsing issue with this ASN.1 module:
https://forge.etsi.org/rep/ITS/asn1/sec_ts103097/-/blob/release2/EtsiTs103097Module.asn

I narrowed it down to the following expressions which both try to set a constraint on a list of elements.
On line 41:
certificate ((WITH COMPONENT (EtsiTs103097Certificate))^(SIZE(1)))
On line 45:

recipients  (WITH COMPONENT (
        (WITH COMPONENTS {..., 
          pskRecipInfo ABSENT,
          symmRecipInfo ABSENT,
          rekRecipInfo ABSENT
        })
      ))

As far as I can tell, this occurs before any of the imported modules are needed.

Cheers

@kurkpitaine
Copy link

I had those issues on the same standard.
These constraints are safe to ignore at compile stage, but you need to implement them yourself.
Example of what I have done available here.

@Nicceboy
Copy link
Contributor

I am soon making PR in rasn/standards to include these as well with all checks.

@kurkpitaine
Copy link

If you have a repo where I can grab these @Nicceboy

@Nicceboy
Copy link
Contributor

If you have a repo where I can grab these @Nicceboy

They are currently in private repo but I will let you know. There is still some work to do as I wanted to add build pattern constructors. Maybe that is something that compiler could also support some day, or it would be derive macro in rasn. There are few third-party crates that provides these but I am not sure yet if they are the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants