Debian Codegraph @

tests/snippets/asn1/certificate.txt

raw
1 ---input---
2 Certificate ::= SEQUENCE {
3 tbsCertificate TBSCertificate,
4 signatureAlgorithm AlgorithmIdentifier,
5 signatureValue BIT STRING }
6
7 TBSCertificate ::= SEQUENCE {
8 version [0] EXPLICIT Version DEFAULT v1,
9 serialNumber CertificateSerialNumber,
10 signature AlgorithmIdentifier,
11 issuer Name,
12 validity Validity,
13 subject Name,
14 subjectPublicKeyInfo SubjectPublicKeyInfo,
15 issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
16 -- If present, version MUST be v2 or v3
17 subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
18 -- If present, version MUST be v2 or v3
19 extensions [3] EXPLICIT Extensions OPTIONAL
20 -- If present, version MUST be v3
21 }
22
23 ---tokens---
24 'Certificate' Name.Type
25 ' ' Text.Whitespace
26 '::=' Operator
27 ' ' Text.Whitespace
28 'SEQUENCE' Keyword.Declaration
29 ' ' Text.Whitespace
30 '{' Punctuation
31 '\n ' Text.Whitespace
32 'tbsCertificate' Name.Variable
33 ' ' Text.Whitespace
34 'TBSCertificate' Name.Type
35 ',' Punctuation
36 '\n ' Text.Whitespace
37 'signatureAlgorithm' Name.Variable
38 ' ' Text.Whitespace
39 'AlgorithmIdentifier' Name.Type
40 ',' Punctuation
41 '\n ' Text.Whitespace
42 'signatureValue' Name.Variable
43 ' ' Text.Whitespace
44 'BIT STRING' Keyword.Type
45 ' ' Text.Whitespace
46 '}' Punctuation
47 '\n\n' Text.Whitespace
48
49 'TBSCertificate' Name.Type
50 ' ' Text.Whitespace
51 '::=' Operator
52 ' ' Text.Whitespace
53 'SEQUENCE' Keyword.Declaration
54 ' ' Text.Whitespace
55 '{' Punctuation
56 '\n ' Text.Whitespace
57 'version' Name.Variable
58 ' ' Text.Whitespace
59 '[' Punctuation
60 '0' Literal.Number.Integer
61 ']' Punctuation
62 ' ' Text.Whitespace
63 'EXPLICIT' Keyword
64 ' ' Text.Whitespace
65 'Version' Name.Type
66 ' ' Text.Whitespace
67 'DEFAULT' Keyword.Declaration
68 ' ' Text.Whitespace
69 'v1' Name.Variable
70 ',' Punctuation
71 '\n ' Text.Whitespace
72 'serialNumber' Name.Variable
73 ' ' Text.Whitespace
74 'CertificateSerialNumber' Name.Type
75 ',' Punctuation
76 '\n ' Text.Whitespace
77 'signature' Name.Variable
78 ' ' Text.Whitespace
79 'AlgorithmIdentifier' Name.Type
80 ',' Punctuation
81 '\n ' Text.Whitespace
82 'issuer' Name.Variable
83 ' ' Text.Whitespace
84 'Name' Name.Type
85 ',' Punctuation
86 '\n ' Text.Whitespace
87 'validity' Name.Variable
88 ' ' Text.Whitespace
89 'Validity' Name.Type
90 ',' Punctuation
91 '\n ' Text.Whitespace
92 'subject' Name.Variable
93 ' ' Text.Whitespace
94 'Name' Name.Type
95 ',' Punctuation
96 '\n ' Text.Whitespace
97 'subjectPublicKeyInfo' Name.Variable
98 ' ' Text.Whitespace
99 'SubjectPublicKeyInfo' Name.Type
100 ',' Punctuation
101 '\n ' Text.Whitespace
102 'issuerUniqueID' Name.Variable
103 ' ' Text.Whitespace
104 '[' Punctuation
105 '1' Literal.Number.Integer
106 ']' Punctuation
107 ' ' Text.Whitespace
108 'IMPLICIT' Keyword
109 ' ' Text.Whitespace
110 'UniqueIdentifier' Name.Type
111 ' ' Text.Whitespace
112 'OPTIONAL' Keyword.Declaration
113 ',' Punctuation
114 '\n ' Text.Whitespace
115 '-- If present, version MUST be v2 or v3' Comment.Single
116 '\n ' Text.Whitespace
117 'subjectUniqueID' Name.Variable
118 ' ' Text.Whitespace
119 '[' Punctuation
120 '2' Literal.Number.Integer
121 ']' Punctuation
122 ' ' Text.Whitespace
123 'IMPLICIT' Keyword
124 ' ' Text.Whitespace
125 'UniqueIdentifier' Name.Type
126 ' ' Text.Whitespace
127 'OPTIONAL' Keyword.Declaration
128 ',' Punctuation
129 '\n ' Text.Whitespace
130 '-- If present, version MUST be v2 or v3' Comment.Single
131 '\n ' Text.Whitespace
132 'extensions' Name.Variable
133 ' ' Text.Whitespace
134 '[' Punctuation
135 '3' Literal.Number.Integer
136 ']' Punctuation
137 ' ' Text.Whitespace
138 'EXPLICIT' Keyword
139 ' ' Text.Whitespace
140 'Extensions' Name.Type
141 ' ' Text.Whitespace
142 'OPTIONAL' Keyword.Declaration
143 '\n ' Text.Whitespace
144 '-- If present, version MUST be v3' Comment.Single
145 '\n ' Text.Whitespace
146 '}' Punctuation
147 '\n' Text.Whitespace