1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
//! Controls-related types
use Box;
use Vec;
use ;
use ;
use EnvelopedData;
use ;
use AttributeTypeAndValue;
use GeneralName;
use SerialNumber;
/// The `Controls` type is defined in [RFC 4211 Section 6].
///
/// ```text
/// Controls ::= SEQUENCE SIZE(1..MAX) OF SingleAttribute
/// {{RegControlSet}}
/// ```
///
/// [RFC 4211 Section 6]: https://www.rfc-editor.org/rfc/rfc4211#section-6
pub type Controls = ;
/// The `RegToken` control is defined in [RFC 4211 Section 6.1].
///
/// ```text
/// RegToken ::= UTF8String
/// ```
///
/// [RFC 4211 Section 6.1]: https://www.rfc-editor.org/rfc/rfc4211#section-6.1
pub type RegToken<'a> = ;
/// The `Authenticator` control is defined in [RFC 4211 Section 6.2].
///
/// ```text
/// Authenticator ::= UTF8String
/// ```
///
/// [RFC 4211 Section 6.2]: https://www.rfc-editor.org/rfc/rfc4211#section-6.2
pub type Authenticator<'a> = ;
/// The `PKIPublicationInfo` control is defined in [RFC 4211 Section 6.3].
///
/// ```text
/// PKIPublicationInfo ::= SEQUENCE {
/// action INTEGER {
/// dontPublish (0),
/// pleasePublish (1) },
/// pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
/// -- pubInfos MUST NOT be present if action is "dontPublish"
/// -- (if action is "pleasePublish" and pubInfos is omitted,
/// -- "dontCare" is assumed)
/// ```
///
/// [RFC 4211 Section 6.3]: https://www.rfc-editor.org/rfc/rfc4211#section-6.3
/// The `PKIPublicationInfo` control is defined [RFC 4211 Section 6.3] features
/// an inline INTEGER definition that is implemented as the PkiPublicationInfoAction enum.
///
/// [RFC 4211 Section 6.3]: https://www.rfc-editor.org/rfc/rfc4211#section-6.3
/// The `SinglePubInfo` control is defined in [RFC 4211 Section 6.3].
///
/// ```text
/// SinglePubInfo ::= SEQUENCE {
/// pubMethod INTEGER {
/// dontCare (0),
/// x500 (1),
/// web (2),
/// ldap (3) },
/// pubLocation GeneralName OPTIONAL }
/// ```
///
/// [RFC 4211 Section 6.3]: https://www.rfc-editor.org/rfc/rfc4211#section-6.3
/// The `SinglePubInfo` control is defined [RFC 4211 Section 6.3] features
/// an inline INTEGER definition that is implemented as the SinglePubInfoMethod enum.
///
/// [RFC 4211 Section 6.3]: https://www.rfc-editor.org/rfc/rfc4211#section-6.3
/// The `PKIArchiveOptions` control is defined in [RFC 4211 Section 6.4].
///
/// ```text
/// PKIArchiveOptions ::= CHOICE {
/// encryptedPrivKey [0] EncryptedKey,
/// -- the actual value of the private key
/// keyGenParameters [1] KeyGenParameters,
/// -- parameters that allow the private key to be re-generated
/// archiveRemGenPrivKey [2] BOOLEAN }
/// -- set to TRUE if sender wishes receiver to archive the private
/// -- key of a key pair that the receiver generates in response to
/// -- this request; set to FALSE if no archive is desired.
/// ```
///
/// [RFC 4211 Section 6.4]: https://www.rfc-editor.org/rfc/rfc4211#section-6.4
/// The `EncryptedKey` type is defined in [RFC 4211 Section 6.4].
///
/// ```text
/// EncryptedKey ::= CHOICE {
/// encryptedValue EncryptedValue, -- Deprecated
/// envelopedData [0] EnvelopedData }
/// -- The encrypted private key MUST be placed in the envelopedData
/// -- encryptedContentInfo encryptedContent OCTET STRING.
/// ```
///
/// [RFC 4211 Section 6.4]: https://www.rfc-editor.org/rfc/rfc4211#section-6.4
/// The `EncryptedValue` type is defined in [RFC 4211 Section 6.4].
///
/// ```text
/// EncryptedValue ::= SEQUENCE {
/// intendedAlg [0] AlgorithmIdentifier{ALGORITHM, {...}} OPTIONAL,
/// -- the intended algorithm for which the value will be used
/// symmAlg [1] AlgorithmIdentifier{ALGORITHM, {...}} OPTIONAL,
/// -- the symmetric algorithm used to encrypt the value
/// encSymmKey [2] BIT STRING OPTIONAL,
/// -- the (encrypted) symmetric key used to encrypt the value
/// keyAlg [3] AlgorithmIdentifier{ALGORITHM, {...}} OPTIONAL,
/// -- algorithm used to encrypt the symmetric key
/// valueHint [4] OCTET STRING OPTIONAL,
/// -- a brief description or identifier of the encValue content
/// -- (may be meaningful only to the sending entity, and used only
/// -- if EncryptedValue might be re-examined by the sending entity
/// -- in the future)
/// encValue BIT STRING }
/// ```
///
/// [RFC 4211 Section 6.4]: https://www.rfc-editor.org/rfc/rfc4211#section-6.4
/// The `KeyGenParameters` control is defined in [RFC 4211 Section 6.4].
///
/// ```text
/// KeyGenParameters ::= OCTET STRING
/// ```
///
/// [RFC 4211 Section 6.4]: https://www.rfc-editor.org/rfc/rfc4211#section-6.4
pub type KeyGenParameters = OctetString;
/// The `OldCertId` control is defined in [RFC 4211 Section 6.5].
///
/// ```text
/// OldCertId ::= CertId
/// ```
///
/// [RFC 4211 Section 6.5]: https://www.rfc-editor.org/rfc/rfc4211#section-6.5
pub type OldCertId = CertId;
/// The `CertId` control is defined in [RFC 4211 Section 6.5].
///
/// ```text
/// CertId ::= SEQUENCE {
/// issuer GeneralName,
/// serialNumber INTEGER }
/// ```
///
/// [RFC 4211 Section 6.5]: https://www.rfc-editor.org/rfc/rfc4211#section-6.5
/// The `ProtocolEncrKey` control is defined in [RFC 4211 Section 6.6].
///
/// ```text
/// ProtocolEncrKey ::= SubjectPublicKeyInfo
/// ```
///
/// [RFC 4211 Section 6.6]: https://www.rfc-editor.org/rfc/rfc4211#section-6.6
pub type ProtocolEncrKey = SubjectPublicKeyInfoOwned;