test.asn1 revision 1.1.1.3.6.1 1 1.1.1.2 elric -- Id --
2 1.1 elric
3 1.1 elric TEST DEFINITIONS ::=
4 1.1 elric
5 1.1 elric BEGIN
6 1.1 elric
7 1.1 elric IMPORTS heim_any FROM heim;
8 1.1 elric
9 1.1 elric TESTuint32 ::= INTEGER (0..4294967295)
10 1.1.1.3.6.1 pgoyette TESTuint64 ::= INTEGER(0..18446744073709551615)
11 1.1.1.3.6.1 pgoyette TESTint64 ::= INTEGER(-9223372036854775808..9223372036854775807)
12 1.1 elric
13 1.1 elric TESTLargeTag ::= SEQUENCE {
14 1.1 elric foo[127] INTEGER (-2147483648..2147483647),
15 1.1 elric bar[128] INTEGER (-2147483648..2147483647)
16 1.1 elric }
17 1.1 elric
18 1.1 elric TESTSeq ::= SEQUENCE {
19 1.1 elric tag0[0] INTEGER (-2147483648..2147483647),
20 1.1 elric tag1[1] TESTLargeTag,
21 1.1 elric tagless INTEGER (-2147483648..2147483647),
22 1.1 elric tag3[2] INTEGER (-2147483648..2147483647)
23 1.1 elric }
24 1.1 elric
25 1.1 elric TESTChoice1 ::= CHOICE {
26 1.1 elric i1[1] INTEGER (-2147483648..2147483647),
27 1.1 elric i2[2] INTEGER (-2147483648..2147483647),
28 1.1 elric ...
29 1.1 elric }
30 1.1 elric
31 1.1 elric TESTChoice2 ::= CHOICE {
32 1.1 elric i1[1] INTEGER (-2147483648..2147483647),
33 1.1 elric ...
34 1.1 elric }
35 1.1 elric
36 1.1 elric TESTInteger ::= INTEGER (-2147483648..2147483647)
37 1.1 elric
38 1.1 elric TESTInteger2 ::= [4] IMPLICIT TESTInteger
39 1.1 elric TESTInteger3 ::= [5] IMPLICIT TESTInteger2
40 1.1 elric
41 1.1 elric TESTImplicit ::= SEQUENCE {
42 1.1 elric ti1[0] IMPLICIT INTEGER (-2147483648..2147483647),
43 1.1 elric ti2[1] IMPLICIT SEQUENCE {
44 1.1 elric foo[127] INTEGER (-2147483648..2147483647)
45 1.1 elric },
46 1.1 elric ti3[2] IMPLICIT [5] IMPLICIT [4] IMPLICIT INTEGER (-2147483648..2147483647)
47 1.1 elric }
48 1.1 elric
49 1.1 elric TESTImplicit2 ::= SEQUENCE {
50 1.1 elric ti1[0] IMPLICIT TESTInteger,
51 1.1.1.3.6.1 pgoyette -- ti2[1] IMPLICIT TESTLargeTag, this is disabled since the IMPLICT encoder does't get the types right when stepping inside an structure --
52 1.1 elric ti3[2] IMPLICIT TESTInteger3
53 1.1 elric }
54 1.1 elric
55 1.1 elric TESTAllocInner ::= SEQUENCE {
56 1.1 elric ai[0] TESTInteger
57 1.1 elric }
58 1.1 elric
59 1.1 elric TESTAlloc ::= SEQUENCE {
60 1.1 elric tagless TESTAllocInner OPTIONAL,
61 1.1 elric three [1] INTEGER (-2147483648..2147483647),
62 1.1 elric tagless2 heim_any OPTIONAL
63 1.1 elric }
64 1.1 elric
65 1.1 elric TESTOptional ::= SEQUENCE {
66 1.1 elric zero [0] INTEGER (-2147483648..2147483647) OPTIONAL,
67 1.1 elric one [1] INTEGER (-2147483648..2147483647) OPTIONAL
68 1.1 elric }
69 1.1 elric
70 1.1 elric
71 1.1 elric TESTCONTAINING ::= OCTET STRING ( CONTAINING INTEGER )
72 1.1 elric TESTENCODEDBY ::= OCTET STRING ( ENCODED BY
73 1.1 elric { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) }
74 1.1 elric )
75 1.1 elric
76 1.1 elric TESTDer OBJECT IDENTIFIER ::= {
77 1.1 elric joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1)
78 1.1 elric }
79 1.1 elric
80 1.1 elric TESTCONTAININGENCODEDBY ::= OCTET STRING ( CONTAINING INTEGER ENCODED BY
81 1.1 elric { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) }
82 1.1 elric )
83 1.1 elric
84 1.1 elric TESTCONTAININGENCODEDBY2 ::= OCTET STRING (
85 1.1 elric CONTAINING INTEGER ENCODED BY TESTDer
86 1.1 elric )
87 1.1 elric
88 1.1 elric
89 1.1 elric TESTValue1 INTEGER ::= 1
90 1.1 elric
91 1.1 elric TESTUSERCONSTRAINED ::= OCTET STRING (CONSTRAINED BY { -- meh -- })
92 1.1 elric -- TESTUSERCONSTRAINED2 ::= OCTET STRING (CONSTRAINED BY { TESTInteger })
93 1.1 elric -- TESTUSERCONSTRAINED3 ::= OCTET STRING (CONSTRAINED BY { INTEGER })
94 1.1 elric -- TESTUSERCONSTRAINED4 ::= OCTET STRING (CONSTRAINED BY { INTEGER : 1 })
95 1.1 elric
96 1.1 elric TESTSeqOf ::= SEQUENCE OF TESTInteger
97 1.1 elric
98 1.1 elric TESTSeqSizeOf1 ::= SEQUENCE SIZE (2) OF TESTInteger
99 1.1 elric TESTSeqSizeOf2 ::= SEQUENCE SIZE (1..2) OF TESTInteger
100 1.1 elric TESTSeqSizeOf3 ::= SEQUENCE SIZE (1..MAX) OF TESTInteger
101 1.1.1.3.6.1 pgoyette TESTSeqSizeOf4 ::= SEQUENCE SIZE (0..2) OF TESTInteger
102 1.1 elric
103 1.1 elric TESTOSSize1 ::= OCTET STRING SIZE (1..2)
104 1.1 elric
105 1.1 elric TESTSeqOfSeq ::= SEQUENCE OF SEQUENCE {
106 1.1 elric zero [0] TESTInteger
107 1.1 elric }
108 1.1 elric
109 1.1 elric TESTSeqOfSeq2 ::= SEQUENCE OF SEQUENCE {
110 1.1 elric string [0] GeneralString
111 1.1 elric }
112 1.1 elric
113 1.1 elric TESTSeqOfSeq3 ::= SEQUENCE OF SEQUENCE {
114 1.1 elric zero [0] TESTInteger,
115 1.1 elric string [0] GeneralString
116 1.1 elric }
117 1.1 elric
118 1.1 elric TESTSeqOf2 ::= SEQUENCE {
119 1.1 elric strings SEQUENCE OF GeneralString
120 1.1 elric }
121 1.1 elric
122 1.1 elric TESTSeqOf3 ::= SEQUENCE {
123 1.1 elric strings SEQUENCE OF GeneralString OPTIONAL
124 1.1 elric }
125 1.1 elric
126 1.1.1.3.6.1 pgoyette -- Larger/more complex to increase odds of out-of-bounds
127 1.1.1.3.6.1 pgoyette -- read/writes if miscoded
128 1.1.1.3.6.1 pgoyette
129 1.1.1.3.6.1 pgoyette TESTSeqOf4 ::= SEQUENCE {
130 1.1.1.3.6.1 pgoyette b1 [0] SEQUENCE OF SEQUENCE {
131 1.1.1.3.6.1 pgoyette s1 OCTET STRING,
132 1.1.1.3.6.1 pgoyette s2 OCTET STRING,
133 1.1.1.3.6.1 pgoyette u1 TESTuint64,
134 1.1.1.3.6.1 pgoyette u2 TESTuint64
135 1.1.1.3.6.1 pgoyette } OPTIONAL,
136 1.1.1.3.6.1 pgoyette b2 [1] IMPLICIT SEQUENCE OF SEQUENCE {
137 1.1.1.3.6.1 pgoyette u1 TESTuint64,
138 1.1.1.3.6.1 pgoyette u2 TESTuint64,
139 1.1.1.3.6.1 pgoyette u3 TESTuint64,
140 1.1.1.3.6.1 pgoyette s1 OCTET STRING,
141 1.1.1.3.6.1 pgoyette s2 OCTET STRING,
142 1.1.1.3.6.1 pgoyette s3 OCTET STRING
143 1.1.1.3.6.1 pgoyette } OPTIONAL,
144 1.1.1.3.6.1 pgoyette b3 [2] IMPLICIT SEQUENCE OF SEQUENCE {
145 1.1.1.3.6.1 pgoyette s1 OCTET STRING,
146 1.1.1.3.6.1 pgoyette u1 TESTuint64,
147 1.1.1.3.6.1 pgoyette s2 OCTET STRING,
148 1.1.1.3.6.1 pgoyette u2 TESTuint64,
149 1.1.1.3.6.1 pgoyette s3 OCTET STRING,
150 1.1.1.3.6.1 pgoyette u3 TESTuint64,
151 1.1.1.3.6.1 pgoyette s4 OCTET STRING,
152 1.1.1.3.6.1 pgoyette u4 TESTuint64
153 1.1.1.3.6.1 pgoyette } OPTIONAL
154 1.1.1.3.6.1 pgoyette }
155 1.1.1.3.6.1 pgoyette
156 1.1.1.3.6.1 pgoyette TESTSeqOf5 ::= SEQUENCE {
157 1.1.1.3.6.1 pgoyette outer SEQUENCE {
158 1.1.1.3.6.1 pgoyette inner SEQUENCE {
159 1.1.1.3.6.1 pgoyette u0 TESTuint64,
160 1.1.1.3.6.1 pgoyette s0 OCTET STRING,
161 1.1.1.3.6.1 pgoyette u1 TESTuint64,
162 1.1.1.3.6.1 pgoyette s1 OCTET STRING,
163 1.1.1.3.6.1 pgoyette u2 TESTuint64,
164 1.1.1.3.6.1 pgoyette s2 OCTET STRING,
165 1.1.1.3.6.1 pgoyette u3 TESTuint64,
166 1.1.1.3.6.1 pgoyette s3 OCTET STRING,
167 1.1.1.3.6.1 pgoyette u4 TESTuint64,
168 1.1.1.3.6.1 pgoyette s4 OCTET STRING,
169 1.1.1.3.6.1 pgoyette u5 TESTuint64,
170 1.1.1.3.6.1 pgoyette s5 OCTET STRING,
171 1.1.1.3.6.1 pgoyette u6 TESTuint64,
172 1.1.1.3.6.1 pgoyette s6 OCTET STRING,
173 1.1.1.3.6.1 pgoyette u7 TESTuint64,
174 1.1.1.3.6.1 pgoyette s7 OCTET STRING
175 1.1.1.3.6.1 pgoyette }
176 1.1.1.3.6.1 pgoyette }
177 1.1.1.3.6.1 pgoyette OPTIONAL
178 1.1.1.3.6.1 pgoyette }
179 1.1.1.3.6.1 pgoyette
180 1.1 elric TESTPreserve ::= SEQUENCE {
181 1.1 elric zero [0] TESTInteger,
182 1.1 elric one [1] TESTInteger
183 1.1 elric }
184 1.1 elric
185 1.1 elric TESTBitString ::= BIT STRING {
186 1.1 elric zero(0),
187 1.1 elric eight(8),
188 1.1 elric thirtyone(31)
189 1.1 elric }
190 1.1 elric
191 1.1.1.3 pettai TESTMechType::= OBJECT IDENTIFIER
192 1.1.1.3 pettai TESTMechTypeList ::= SEQUENCE OF TESTMechType
193 1.1.1.3 pettai
194 1.1 elric END
195