xref: /freebsd/crypto/heimdal/lib/asn1/test.asn1 (revision 5ca8c28cd8c725b81781201cfdb5f9969396f934)
1-- $Id$ --
2
3TEST DEFINITIONS ::=
4
5BEGIN
6
7IMPORTS heim_any FROM heim;
8
9TESTuint32 ::= INTEGER (0..4294967295)
10TESTuint64 ::= INTEGER(0..18446744073709551615)
11TESTint64 ::= INTEGER(-9223372036854775808..9223372036854775807)
12
13TESTLargeTag ::= SEQUENCE {
14	foo[127] INTEGER (-2147483648..2147483647),
15	bar[128] INTEGER (-2147483648..2147483647)
16}
17
18TESTSeq ::= SEQUENCE {
19	tag0[0] INTEGER (-2147483648..2147483647),
20	tag1[1] TESTLargeTag,
21	tagless INTEGER (-2147483648..2147483647),
22	tag3[2] INTEGER (-2147483648..2147483647)
23}
24
25TESTChoice1 ::= CHOICE {
26	i1[1]	INTEGER (-2147483648..2147483647),
27	i2[2]	INTEGER (-2147483648..2147483647),
28	...
29}
30
31TESTChoice2 ::= CHOICE {
32	i1[1]	INTEGER (-2147483648..2147483647),
33	...
34}
35
36TESTInteger ::= INTEGER (-2147483648..2147483647)
37
38TESTInteger2 ::= [4] IMPLICIT TESTInteger
39TESTInteger3 ::= [5] IMPLICIT TESTInteger2
40
41TESTImplicit ::= SEQUENCE {
42	ti1[0] IMPLICIT INTEGER (-2147483648..2147483647),
43	ti2[1] IMPLICIT SEQUENCE {
44		foo[127] INTEGER (-2147483648..2147483647)
45	},
46	ti3[2] IMPLICIT [5] IMPLICIT [4] IMPLICIT INTEGER (-2147483648..2147483647)
47}
48
49TESTImplicit2 ::= SEQUENCE {
50	ti1[0] IMPLICIT TESTInteger,
51	ti2[1] IMPLICIT TESTLargeTag,
52	ti3[2] IMPLICIT TESTInteger3
53}
54
55TESTAllocInner ::= SEQUENCE {
56	ai[0] TESTInteger
57}
58
59TESTAlloc ::= SEQUENCE {
60	  tagless TESTAllocInner OPTIONAL,
61	  three [1] INTEGER (-2147483648..2147483647),
62	  tagless2 heim_any OPTIONAL
63}
64
65TESTOptional ::= SEQUENCE {
66	  zero [0] INTEGER (-2147483648..2147483647) OPTIONAL,
67	  one [1] INTEGER (-2147483648..2147483647) OPTIONAL
68}
69
70
71TESTCONTAINING ::= OCTET STRING ( CONTAINING INTEGER )
72TESTENCODEDBY ::= OCTET STRING ( ENCODED BY
73  { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) }
74)
75
76TESTDer OBJECT IDENTIFIER ::= {
77	joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1)
78}
79
80TESTCONTAININGENCODEDBY ::= OCTET STRING ( CONTAINING INTEGER ENCODED BY
81  { joint-iso-itu-t(2) asn(1) ber-derived(2) distinguished-encoding(1) }
82)
83
84TESTCONTAININGENCODEDBY2 ::= OCTET STRING (
85	CONTAINING INTEGER ENCODED BY TESTDer
86)
87
88
89TESTValue1 INTEGER ::= 1
90
91TESTUSERCONSTRAINED ::= OCTET STRING (CONSTRAINED BY { -- meh -- })
92-- TESTUSERCONSTRAINED2 ::= OCTET STRING (CONSTRAINED BY { TESTInteger })
93-- TESTUSERCONSTRAINED3 ::= OCTET STRING (CONSTRAINED BY { INTEGER })
94-- TESTUSERCONSTRAINED4 ::= OCTET STRING (CONSTRAINED BY { INTEGER : 1 })
95
96TESTSeqOf ::= SEQUENCE OF TESTInteger
97
98TESTSeqSizeOf1 ::= SEQUENCE SIZE (2) OF TESTInteger
99TESTSeqSizeOf2 ::= SEQUENCE SIZE (1..2) OF TESTInteger
100TESTSeqSizeOf3 ::= SEQUENCE SIZE (1..MAX) OF TESTInteger
101TESTSeqSizeOf4 ::= SEQUENCE SIZE (MIN..2) OF TESTInteger
102
103TESTOSSize1 ::= OCTET STRING SIZE (1..2)
104
105TESTSeqOfSeq ::= SEQUENCE OF SEQUENCE {
106	zero [0] TESTInteger
107}
108
109TESTSeqOfSeq2 ::= SEQUENCE OF SEQUENCE {
110	string [0] GeneralString
111}
112
113TESTSeqOfSeq3 ::= SEQUENCE OF SEQUENCE {
114	zero [0] TESTInteger,
115	string [0] GeneralString
116}
117
118TESTSeqOf2 ::= SEQUENCE {
119	strings SEQUENCE OF GeneralString
120}
121
122TESTSeqOf3 ::= SEQUENCE {
123	strings SEQUENCE OF GeneralString OPTIONAL
124}
125
126TESTPreserve ::= SEQUENCE {
127	zero [0] TESTInteger,
128	one [1] TESTInteger
129}
130
131TESTBitString ::= BIT STRING {
132	      zero(0),
133	      eight(8),
134	      thirtyone(31)
135}
136
137TESTMechType::= OBJECT IDENTIFIER
138TESTMechTypeList ::= SEQUENCE OF TESTMechType
139
140END
141