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

Update ETSI TS 103 097 & 102 941 security specs #223

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

DeeJayBro
Copy link
Contributor

Updates the security-related ASN definitions for TS 102 941 to v2.2.1 and TS 103 097 to v2.1.1.

As the IEEE definitions need some patching and with the introduction of IEEE1609.2.1 in TS 102 941 plus the resulting increase in the amount of files, these were outsourced to a cmake script which also takes care of the patching

Compiling to code needs an asn1c with the following pull request (mouse07410/asn1c#138), as newer ETSI ITS ASN.1 defs make great use of WITH SUCCESSORS

vanetza/asn1/fetch_ieee_asn1_files.cmake Outdated Show resolved Hide resolved
)
/**
* @brief This structure defines the format of a signed certificate request.")
string(REGEX REPLACE "ScopedCertificateRequest ::=.+signed certificate request." "${_valid_scoped_certificate_request}" _content "${_content}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It becomes quite hard to see the actual patch this way. I prefer to have a patch file then. Is there a reason why a patch file is inappropriate here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the complexity only started to explode after beginning that script already so i didn't change it to a patch, but good idea!

@DeeJayBro DeeJayBro force-pushed the etsi_security_update branch 2 times, most recently from e3d6bf4 to 88b959d Compare March 18, 2024 15:37
@DeeJayBro DeeJayBro requested a review from riebl March 19, 2024 15:16
@DeeJayBro
Copy link
Contributor Author

Any update on this? should the asn1 definitions moved to release2 to allow v2.1.1 and v1.3.1 to coexist?

@DeeJayBro DeeJayBro force-pushed the etsi_security_update branch from 88b959d to 1cb10e9 Compare December 8, 2024 18:12
@DeeJayBro
Copy link
Contributor Author

@riebl i have rebased the PR and moved the asn1 files to the release2 directory and the generated code to a r2 subdirectory in the security directory

@DeeJayBro
Copy link
Contributor Author

I just rechecked, replacing the "old" definitions should also be workable, since the standard extends a few datatypes and moves over to directly to IEEE 1609 but not changing on outer-facing definitions, with all tests still passing on a slate using the new asn.1 files

@riebl
Copy link
Owner

riebl commented Dec 12, 2024

What is the reason for patching IEEE 1609.2.1? Is it not supported by asn1c?

@DeeJayBro
Copy link
Contributor Author

Yes, without the patch, asn1c is throwing the following fatal errors on compilation:

FATAL: Type ScmsPdu-Scoped expects specialization from ScmsPdu-Scoped at line 448 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Cannot find type "<Type>" in constraints at line 452 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Type ScmsPdu-Scoped expects specialization from ScmsPdu-Scoped at line 453 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Cannot find type "<Type>" in constraints at line 457 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Type ScmsPdu-Scoped expects specialization from ScmsPdu-Scoped at line 458 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Cannot find type "<Type>" in constraints at line 462 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Type ScmsPdu-Scoped expects specialization from ScmsPdu-Scoped at line 463 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn
FATAL: Cannot find type "<Type>" in constraints at line 468 in build.asn1/ieee/IEEE1609dot2dot1Protocol.asn

This behaviour seems to be known (see mouse07410/asn1c#194 and vlm/asn1c#400) but there does not seem to be a planned fix on the asn1c roadmap

@riebl
Copy link
Owner

riebl commented Dec 16, 2024

Thanks for your contribution @DeeJayBro!

Side note: Our code generation for ASN.1 has become a little bit messy over the years. I would like to revise it in the foreseeable future. If you have some ideas, please feel free to add them as issue tickets.

@riebl riebl merged commit 1bec803 into riebl:master Dec 16, 2024
4 checks passed
@DeeJayBro DeeJayBro deleted the etsi_security_update branch December 17, 2024 09:25
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

Successfully merging this pull request may close these issues.

2 participants