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
//! CertBag-related types
use ;
use Sequence;
/// The `CertBag` type is defined in [RFC 7292 Section 4.2.3].
///
///```text
/// CertBag ::= SEQUENCE {
/// certId BAG-TYPE.&id ({CertTypes}),
/// certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
/// }
///```
///
/// [RFC 7292 Section 4.2.3]: https://www.rfc-editor.org/rfc/rfc7292#section-4.2.3
// todo defer: add sdsiCertificate support
/// The `CertTypes` type is defined in [RFC 7292 Section 4.2.3].
///
///```text
/// x509Certificate BAG-TYPE ::=
/// {OCTET STRING IDENTIFIED BY {certTypes 1}}
/// -- DER-encoded X.509 certificate stored in OCTET STRING
/// sdsiCertificate BAG-TYPE ::=
/// {IA5String IDENTIFIED BY {certTypes 2}}
/// -- Base64-encoded SDSI certificate stored in IA5String
///
/// CertTypes BAG-TYPE ::= {
/// x509Certificate |
/// sdsiCertificate,
/// ... -- For future extensions
/// }
///```
///
/// [RFC 7292 Section 4.2.3]: https://www.rfc-editor.org/rfc/rfc7292#section-4.2.3
pub type CertTypes = OctetString;