I noticed in X.680:2002 that ENUMERATED is extensible, while the
NamedNumberList in INTEGER and the NamedBitList in BIT STRING are not.
Does anyone know why?  Is it because the NamedNumberList and
NamedBitList don't actually constrain the set of possible values of
the type?

Also, it appears that, e.g., a NamedBitList may be attached only to
the BIT STRING type itself, not to any TypeReference name that happens
to be a BIT STRING, so it's invalid to have

Flags ::= BIT STRING (SIZE (32..MAX))

Flags1 ::= Flags { foo(0), bar(1) }

but it is valid to have

Flags ::= BIT STRING (SIZE (32..MAX))

Flags2 ::= Flags (BIT STRING { foo(0), bar(1) })

The interesting question for the Flags2 is whether the size constraint
from Flags overrides the "strip trailing zero bits of named bit
strings" rule of DER.  Does anyone know the answer to this?

On the other hand, perhaps it would not be possible to actually use
the named bits in the value notation for Flags2, since the named bits
are associated with anonymous BIT STRING.  Another possibility is

Flags ::= BIT STRING (SIZE (32..MAX))

Flags2 ::= BIT STRING { foo(0), bar(1) } (Flags)

but that causes the size constraint to be overriden on encode by the
DER bit-stripping rule, right?

---Tom

Reply via email to