Initialize Tizen 2.3
[external/libtasn1.git] / tests / Test_tree.asn
1 --
2 --  File used in the test sequence Test_tree.
3 --
4
5 TEST_TREE {iso(1) identified-organization(3) dod(6) internet(1)
6   security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit-88(2)}
7
8 DEFINITIONS IMPLICIT TAGS ::=
9
10 BEGIN
11
12 KrbError ::= [APPLICATION 30] SEQUENCE {
13     pvno[0]   INTEGER
14 }
15
16 Checksum        ::= SEQUENCE {
17         checksum        [1] OCTET STRING
18 }
19
20 CertTemplate ::= SEQUENCE {
21     version      [0] INTEGER               OPTIONAL,
22     issuer       [3] Name                  OPTIONAL,
23     validity     [4] INTEGER               OPTIONAL
24 }
25
26 Name            ::=   CHOICE {
27     rdnSequence  RDNSequence }
28
29 RDNSequence     ::=   RelativeDistinguishedName
30
31 RelativeDistinguishedName  ::=
32
33                     SET SIZE (1 .. MAX) OF AttributeTypeAndValue
34
35 AttributeTypeAndValue           ::=     SEQUENCE {
36         type    AttributeType,
37         value   AttributeValue }
38
39 AttributeType           ::=   OBJECT IDENTIFIER
40 AttributeValue          ::=   ANY
41
42
43 sequenceEmpty ::= SEQUENCE{
44   int1   INTEGER,
45   seq1   [1] IMPLICIT Sequence_octetTest1,
46   set1   [2] EXPLICIT SET OF INTEGER
47 }
48
49
50 IndefiniteLengthTest ::= SEQUENCE{
51   seq1   [1] IMPLICIT Sequence_octetTest1,
52   set1   SET OF OBJECT IDENTIFIER,
53   int1   INTEGER
54 }
55
56
57 OidTest ::= SEQUENCE{
58    oid3 [3]   OBJECT IDENTIFIER DEFAULT id-Test,
59    oid  [1]   OBJECT IDENTIFIER DEFAULT id-anyTest2,
60    oid2 [2]   OBJECT IDENTIFIER DEFAULT id-anyTest
61 }
62
63 OidAndTimeTest ::= SEQUENCE{
64    set     SET OF INTEGER,
65    oid     OBJECT IDENTIFIER,
66    time2   GeneralizedTime,
67    bol     BOOLEAN,
68    oct     OCTET STRING,
69    bit     BIT STRING OPTIONAL,
70    bol2    BOOLEAN DEFAULT TRUE,
71    enum    ENUMERATED {v1(1),v2(2)} DEFAULT v1,
72    any     [1] ANY OPTIONAL,
73    gen     GeneralString OPTIONAL,
74    time1   UTCTime
75 }
76
77 SequenceTestTag ::= SEQUENCE{
78    int1   [2] EXPLICIT INTEGER,
79    int2   [3] IMPLICIT INTEGER,
80    str1   [1] IMPLICIT PrintableString,
81    str2                UniversalString,
82    str3   [2] EXPLICIT UniversalString
83 }
84
85
86 Sequence1 ::= SEQUENCE{
87     int1 [0] INTEGER {v1(0),v2(1),v3(2)} DEFAULT v2,
88     int2     INTEGER,
89     seq      SET OF INTEGER,
90     id       OBJECT IDENTIFIER,
91     oct      OCTET STRING,
92     any1     ANY DEFINED BY id OPTIONAL
93 }
94
95 DHParameter ::= SEQUENCE {
96     prime INTEGER,
97     base  INTEGER,
98     privateValueLength INTEGER OPTIONAL
99 }
100
101 id-octetTest1 OBJECT IDENTIFIER  ::=  {1 2 3 4}
102
103 Sequence_octetTest1 ::= SEQUENCE{
104     int     INTEGER OPTIONAL
105 }
106
107
108 AnyTest2 ::= CHOICE{
109      str    OCTET STRING,
110      int    INTEGER
111 }
112
113 id-ic OBJECT IDENTIFIER  ::=  {2 5}
114 id-anyTest OBJECT IDENTIFIER  ::=  {id-ic 29 1}
115 id-anyTest2 OBJECT IDENTIFIER  ::=  {id-ic 29 2}
116
117
118 anyTest2  ::= INTEGER
119
120
121 VisibleString ::= [UNIVERSAL 26] IMPLICIT OCTET STRING
122
123 NumericString ::= [UNIVERSAL 18] IMPLICIT OCTET STRING
124
125 IA5String ::= [UNIVERSAL 22] IMPLICIT OCTET STRING
126
127 TeletexString ::= [UNIVERSAL 20] IMPLICIT OCTET STRING
128
129 PrintableString ::= [UNIVERSAL 19] IMPLICIT OCTET STRING
130
131 UniversalString ::= [UNIVERSAL 28] IMPLICIT OCTET STRING
132         -- UniversalString is defined in ASN.1:1993
133
134 BMPString ::= [UNIVERSAL 30] IMPLICIT OCTET STRING
135       -- BMPString is the subtype of UniversalString and models
136        -- the Basic Multilingual Plane of ISO/IEC/ITU 10646-1
137
138 UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
139         -- The content of this type conforms to RFC 2279.
140
141
142 Test3 ::= SEQUENCE{
143      a      INTEGER,
144      b      [1] EXPLICIT GeneralString2
145 }
146
147
148 GeneralString2 ::= [2] EXPLICIT GeneralString
149
150 X520LocalityName ::= CHOICE {
151       teletexString       TeletexString,
152       printableString     PrintableString,
153       universalString     UniversalString,
154       utf8String          UTF8String,
155       bmpString           BMPString    }
156
157
158 id-Test OBJECT IDENTIFIER  ::=  {1 2 29 2}
159
160 END
161
162 -- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
163 -- Free Software Foundation, Inc.
164 --
165 -- This file is part of LIBTASN1.
166 --
167 -- This program is free software: you can redistribute it and/or modify
168 -- it under the terms of the GNU General Public License as published by
169 -- the Free Software Foundation, either version 3 of the License, or
170 -- (at your option) any later version.
171 --
172 -- This program is distributed in the hope that it will be useful,
173 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
174 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
175 -- GNU General Public License for more details.
176 --
177 -- You should have received a copy of the GNU General Public License
178 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.