Fields declared after extension (...) are not set as optional [message #1858626] |
Wed, 12 April 2023 12:30 |
Yann Garcia Messages: 145 Registered: June 2016 |
Senior Member |
|
|
Dear Support,
Regarding to the ASN.1 standards, is a SEQUENCE, the fields declared after the extension symbol (...) shall be OPTIONAL by default due to backward compatibility.
For instance, ieee1609.2, we have the following declaration where the fields flags, appExtensions, certIssueExtensions and certRequestExtension shall be optional even if it is not indicated:
ToBeSignedCertificate ::= SEQUENCE {
id CertificateId,
cracaId HashedId3,
crlSeries CrlSeries,
validityPeriod ValidityPeriod,
region GeographicRegion OPTIONAL,
assuranceLevel SubjectAssurance OPTIONAL,
appPermissions SequenceOfPsidSsp OPTIONAL,
certIssuePermissions SequenceOfPsidGroupPermissions OPTIONAL,
certRequestPermissions SequenceOfPsidGroupPermissions OPTIONAL,
canRequestRollover NULL OPTIONAL,
encryptionKey PublicEncryptionKey OPTIONAL,
verifyKeyIndicator VerificationKeyIndicator,
...,
flags BIT STRING {usesCubk (0)} (SIZE (8)),
appExtensions SequenceOfAppExtensions
certIssueExtensions SequenceOfCertIssueExtensions,
certRequestExtension SequenceOfCertRequestExtensions
}
The C++ code generated by the TITAN ASN.1 compiler does not generate these fields with OPTIONAL decoration.
So I think there is an issue with the TITAN ASN.1 compiler.
What do you think?
Many thanks for your help,
BR\ Yann Garcia
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05463 seconds