1ParamBasic DEFINITIONS AUTOMATIC TAGS ::= 2 3BEGIN 4 5General1{T,T:val} ::= SEQUENCE { 6 number INTEGER, 7 string T DEFAULT val 8} 9 10T11 ::= General1{PrintableString,"hej"} 11 12T12 ::= General1{BIT STRING,'1010'B} 13 14General2{T} ::= SEQUENCE { 15 number INTEGER, 16 string T 17} 18 19T21 ::= General2{PrintableString} 20 21T22 ::= General2{BIT STRING} 22 23 24-- 25-- Test a class parameter that is the governor for another parameter. 26-- 27 28AlgorithmIdentifier{ALGORITHM-TYPE, ALGORITHM-TYPE:AlgorithmSet} ::= 29 SEQUENCE { 30 algorithm ALGORITHM-TYPE.&id ({AlgorithmSet}), 31 type ALGORITHM-TYPE.&Type ({AlgorithmSet}{@algorithm}) 32 } 33 34AnAlgorithm ::= AlgorithmIdentifier{ SIGNATURE-ALGORITHM, 35 { {KEY 1 CONTAINING INTEGER} | 36 {KEY 2 CONTAINING BOOLEAN} } } 37 38SIGNATURE-ALGORITHM ::= CLASS { 39 &id INTEGER UNIQUE, 40 &Type 41} WITH SYNTAX { 42 KEY &id CONTAINING &Type 43} 44 45alg-seq-1 AnAlgorithm ::= { algorithm 1, type 42 } 46alg-seq-2 AnAlgorithm ::= { algorithm 2, type TRUE } 47 48-- 49-- Test that indirect classes references are resolved. 50-- 51 52AlgorithmIdentifier2 { ALGORITHM-IDENTIFIER:InfoObjectSet } ::= SEQUENCE { 53 algorithm ALGORITHM-IDENTIFIER.&id({InfoObjectSet}), 54 parameters ALGORITHM-IDENTIFIER.&Type({InfoObjectSet} {@algorithm}) OPTIONAL 55} 56 57ALGORITHM-IDENTIFIER ::= TYPE-IDENTIFIER 58 59Seq ::= SEQUENCE { 60 c1 AlgorithmIdentifier2 {{ObjectSet-1}}, 61 c2 AlgorithmIdentifier2 {{ObjectSet-2}} 62} 63 64ObjectSet-1 ALGORITHM-IDENTIFIER ::= { {INTEGER IDENTIFIED BY {2 1 1}}, ... } 65ObjectSet-2 ALGORITHM-IDENTIFIER ::= { ... } 66 67-- Test a value that uses the instantiation of a parameterized type inline. 68-- (Adapted from PKCS-5.) 69-- 70 71algid-hmacWithSHA1 AlgorithmIdentifier2 {{ObjectSet-3}} ::= 72 {algorithm id-hmacWithSHA1, parameters NULL : NULL} 73 74ObjectSet-3 TYPE-IDENTIFIER ::= { {NULL IDENTIFIED BY id-hmacWithSHA1} } 75 76id-hmacWithSHA1 OBJECT IDENTIFIER ::= {2 9 9 9 7} 77 78END 79