File tree 5 files changed +56
-0
lines changed
5 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,17 @@ impl AssociatedOid for SubjectAltName {
65
65
}
66
66
67
67
impl_newtype ! ( SubjectAltName , name:: GeneralNames ) ;
68
+ // TODO(baloo): apply that?
69
+ // Further, if the only subject identity included in the certificate is
70
+ // an alternative name form (e.g., an electronic mail address), then the
71
+ // subject distinguished name MUST be empty (an empty sequence), and the
72
+ // subjectAltName extension MUST be present. If the subject field
73
+ // contains an empty sequence, then the issuing CA MUST include a
74
+ // subjectAltName extension that is marked as critical. When including
75
+ // the subjectAltName extension in a certificate that has a non-empty
76
+ // subject distinguished name, conforming CAs SHOULD mark the
77
+ // subjectAltName extension as non-critical.
78
+ impl_extension ! ( SubjectAltName ) ;
68
79
69
80
/// IssuerAltName as defined in [RFC 5280 Section 4.2.1.7].
70
81
///
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ impl AssociatedOid for CertificatePolicies {
22
22
}
23
23
24
24
impl_newtype ! ( CertificatePolicies , Vec <PolicyInformation >) ;
25
+ // TODO
26
+ // If this extension is
27
+ // critical, the path validation software MUST be able to interpret this
28
+ // extension (including the optional qualifier), or MUST reject the
29
+ // certificate.
30
+ impl_extension ! ( CertificatePolicies ) ;
25
31
26
32
/// PolicyInformation as defined in [RFC 5280 Section 4.2.1.4].
27
33
///
Original file line number Diff line number Diff line change @@ -22,3 +22,17 @@ pub struct BasicConstraints {
22
22
impl AssociatedOid for BasicConstraints {
23
23
const OID : ObjectIdentifier = ID_CE_BASIC_CONSTRAINTS ;
24
24
}
25
+
26
+ // TODO
27
+ // Conforming CAs MUST include this extension in all CA certificates
28
+ // that contain public keys used to validate digital signatures on
29
+ // certificates and MUST mark the extension as critical in such
30
+ // certificates. This extension MAY appear as a critical or non-
31
+ // critical extension in CA certificates that contain public keys used
32
+ // exclusively for purposes other than validating digital signatures on
33
+ // certificates. Such CA certificates include ones that contain public
34
+ // keys used exclusively for validating digital signatures on CRLs and
35
+ // ones that contain key management public keys used with certificate
36
+ // enrollment protocols. This extension MAY appear as a critical or
37
+ // non-critical extension in end entity certificates.
38
+ impl_extension ! ( BasicConstraints , critical = true ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,17 @@ pub struct NameConstraints {
30
30
impl AssociatedOid for NameConstraints {
31
31
const OID : ObjectIdentifier = ID_CE_NAME_CONSTRAINTS ;
32
32
}
33
+ // TODO: whatever that means:
34
+ // Restrictions are defined in terms of permitted or excluded name
35
+ // subtrees. Any name matching a restriction in the excludedSubtrees
36
+ // field is invalid regardless of information appearing in the
37
+ // permittedSubtrees. Conforming CAs MUST mark this extension as
38
+ // critical and SHOULD NOT impose name constraints on the x400Address,
39
+ // ediPartyName, or registeredID name forms. Conforming CAs MUST NOT
40
+ // issue certificates where name constraints is an empty sequence. That
41
+ // is, either the permittedSubtrees field or the excludedSubtrees MUST
42
+ // be present.
43
+ impl_extension ! ( NameConstraints ) ;
33
44
34
45
/// GeneralSubtrees as defined in [RFC 5280 Section 4.2.1.10].
35
46
///
Original file line number Diff line number Diff line change @@ -78,6 +78,20 @@ impl AssociatedOid for ExtendedKeyUsage {
78
78
}
79
79
80
80
impl_newtype ! ( ExtendedKeyUsage , Vec <ObjectIdentifier >) ;
81
+ // TODO
82
+ // This extension MAY, at the option of the certificate issuer, be
83
+ // either critical or non-critical.
84
+ //
85
+ // If a CA includes extended key usages to satisfy such applications,
86
+ // but does not wish to restrict usages of the key, the CA can include
87
+ // the special KeyPurposeId anyExtendedKeyUsage in addition to the
88
+ // particular key purposes required by the applications. Conforming CAs
89
+ // SHOULD NOT mark this extension as critical if the anyExtendedKeyUsage
90
+ // KeyPurposeId is present. Applications that require the presence of a
91
+ // particular purpose MAY reject certificates that include the
92
+ // anyExtendedKeyUsage OID but not the particular OID expected for the
93
+ // application.
94
+ impl_extension ! ( ExtendedKeyUsage , critical = true ) ;
81
95
82
96
/// PrivateKeyUsagePeriod as defined in [RFC 3280 Section 4.2.1.4].
83
97
///
You can’t perform that action at this time.
0 commit comments