Dear Mr. Gorski:
The OSS ASN.1 Tools does handle such component relation constraints, but not at compile time, and the OSS ASN.1 Syntax Checker is only a compile-time kind of product. After all, it's not your syntax that's wrong; it's the constraint that's violated.
Here's the error message we would produce at runtime
E0062S: Value range constraint violated, value = 0; check field 'parameters' (type: OpenType) of PDU #2 'Algo'.
===================================================================== 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
I've come across the following situation and I am not sure whether this is a language issue or a problem with the tools or a consequence of my lack of experience with ASN.1.
I have defined: - an ALGORITHM information object class and an AlgorithmIdentifier type (at the bottom of the module, see below) - an information object xxx and an (extensible) information object set AlgoSet - a parameterized seqence type Algo with the parameter defining a component relation constraint
I now want to define a value of type Algo (algo1 and algo2 in the module) and this is where my intuition fails because I expected that the values supplied for the second parameter would be checked against the given type and flagged as out of range but this does not happen either in asnp or the OSS syntax checker.
Any suggestions why the range is not being checked (hopefully with a reference to the appropriate clause of the standard) ?
Thanks in advance,
Karol Gorski
SampleApplication2 DEFINITIONS ::= BEGIN
-- ============================= -- sample information object definition id-x OBJECT IDENTIFIER ::= {0 1 99 99 99 1} XParams ::= INTEGER (80..160) xxx ALGORITHM ::= { OID id-x PARMS XParams }
-- ============================= -- sample information object set AlgoSet ALGORITHM ::= { xxx , ... -- Expect additional algorithms -- }
-- algorithm identifier constrained by the parameter Algo ::= AlgorithmIdentifier {{AlgoSet}}
-- ============================= -- sample algorithm idenfier values -- I expected both to be flagged as out of range
algo1 Algo ::= {algorithm id-x, parameters XParams:0} algo2 Algo ::= {algorithm id-x, parameters XParams:256}
-- ============================= ALGORITHM ::= CLASS { &id OBJECT IDENTIFIER UNIQUE, &Type OPTIONAL } WITH SYNTAX {OID &id [PARMS &Type]}
AlgorithmIdentifier{ALGORITHM:IOSet}::= SEQUENCE { algorithm ALGORITHM.&id({IOSet}), parameters ALGORITHM.&Type([EMAIL PROTECTED]) OPTIONAL }
END
_______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
