Hi,
 
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

Reply via email to