RFC 3281 defines Attribute as follows.
Attribute ::= SEQUENCE {
type AttributeType,
values SET OF AttributeValue
-- at least one value is required
}
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY DEFINED BY AttributeType
1. I thought that ANY DEFINED BY had to refer to an the identifier of a
NamedType (::= identifier Type). Can it refer to a Type?
Dear Mr. Steinitz:
RFC 3281 is wrong, and you are right. It cannot refer to a Type.
Something with similar intent, but using valid syntax, is possible using
1994 ASN.1, namely, with Component Relation Constraints.
2. Should the definition be as follows?
Attribute ::= SEQUENCE {
type AttributeType,
values SET OF ANY DEFINED BY type,
-- at least one value is required
}
No, that also would be invalid. The ANY DEFINED BY must be a component of
a SET or a SEQUENCE. As with example 1, however, the intent of this would
be possible using Component Relation Constraints.
3. Is this valid or does the referenced identifier have to appear before it is
used?
Foo ::= SEQUENCE {
bar ANY DEFINED BY type,
foo INTEGER,
type OBJECT IDENTIFIER
}
It is valid.
4. I assume this is invalid but asnp (http://asn1.elibel.tm.fr/tools/asnp) and
asn1c (http://lionet.info/asn1c/asn1c.cgi) accept it.
Bar ::= SEQUENCE {
bar ANY DEFINED BY type,
foo INTEGER
}
You are again right. It is indeed invalid.
=====================================================================
Conrad Sigona Voice Mail : 1-732-302-9669 x400
OSS Nokalva Fax : 1-614-388-4156
[EMAIL PROTECTED] My direct line : 1-315-845-1773
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1