[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Cross-purpose SEQUENCE/CHOICE protocol extension fields
Hi Rici,
Rici Lake wrote:
On 8-Nov-04, at 7:48 PM, Steven Legg wrote:
If one follows the ASN.1 rules for extensibility then a known
element will never follow an unknown element.
Surely that is not true.
To clarify, I was talking about the immediate components of a SEQUENCE, SET
or CHOICE. Of course, any of the immediate components could itself be an
extensible SEQUENCE, SET or CHOICE. I was also ignoring the double extension
marker notation since the LDAP specification hasn't made use of it.
To be more precise I should say "If one follows the ASN.1 rules for
extensibility then a known extension will never follow an unknown extension
of the same SEQUENCE, SET or CHOICE type".
> If there is an extension marker in
the base specification, that's where extensions go; there is
no requirement that it be at the end.
True, but it would be unusual to put a single extension marker before
the end in the *base* specification, in effect creating some predefined
extensions. In any case, since it is the *base* specification those
prefined extensions are known. Any subsequent extension has to go after
the previously defined extensions, so it will still be the case that an
unknown extension follows the known extensions of the type with the
extension marker.
> Furthermore, there might
be an extensible CHOICE in the middle of a SEQUENCE.
Yes, but any new extension to the CHOICE will appear at the end of
the CHOICE definition.
X.680 (07/2002), 48.1 (just after a note that extension markers
have no effect on BER); "The extension marker ... makes no statement
as to how such additions should be handled other than that they
should not be treated as an error during the decoding process."
X.608 (07/2002), G.1 is more instructive. It says 'Table G.1 shows the ASN.1
types that can form the extension root type of an ASN.1 extension series, and
the nature of the single extension addition that is permitted for that type
(multiple extension additions can of course be made in succession, or together
as an extension group).'
Under SEQUENCE and SET, Table G.1 allows 'Addition of a single type or extension
group to the *end* of the "ExtensionAdditionList".' The emphasis is mine.
Under CHOICE, Table G.1 allows 'Addition of a single "NamedType" to the *end* of
the "ExtensionAdditionAlternativesList".'
Regards,
Steven