[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Cross-purpose SEQUENCE/CHOICE protocol extension fields




On 9-Nov-04, at 6:18 AM, Hallvard B Furuseth wrote:

If one does not know that the peer recognizes an LDAPResult extension,
can that extension be used at all in COMPONENTS OF LDAPResult followed
by some other element?  My guess is no, unless COMPONENTS OF for some
reason is an exception to 'known elements precede unknown elements'.
Even if an extension is standardized, that doesn't mean the peer is
updated to recognize that new standard.

COMPONENTS OF only includes the "root components" of the included type. That is, any extensions markers (...) and any extension additions are not included. This is necessary because the SEQUENCE which includes COMPONENTS OF might have its own extensions, and ASN.1 requires that all extensions be contiguous (but does not require the contiguous sequence of extensions to be at the end).

ASN.1 is carefully designed so that a decoder can skip over unknown
extensions. It should not be necessary to use any other mechanism
to make this possible. Of course, it may still useful to be able
to declare which extensions are supported.