OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ | 5 #ifndef NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ |
6 #define NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ | 6 #define NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Corresponds with "issuer" from RFC 5280: | 147 // Corresponds with "issuer" from RFC 5280: |
148 // issuer Name, | 148 // issuer Name, |
149 // | 149 // |
150 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 150 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
151 // guarantees are made regarding the value of this SEQUENCE. | 151 // guarantees are made regarding the value of this SEQUENCE. |
152 der::Input issuer_tlv; | 152 der::Input issuer_tlv; |
153 | 153 |
154 // Corresponds with "validity" from RFC 5280: | 154 // Corresponds with "validity" from RFC 5280: |
155 // validity Validity, | 155 // validity Validity, |
156 // | 156 // |
157 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 157 // Where Validity is defined as: |
158 // guarantees are made regarding the value of this SEQUENCE. | 158 // |
159 der::Input validity_tlv; | 159 // Validity ::= SEQUENCE { |
| 160 // notBefore Time, |
| 161 // notAfter Time } |
| 162 // |
| 163 // Parsing guarantees that notBefore (validity_not_before) and notAfter |
| 164 // (validity_not_after) are valid DER-encoded dates, however it DOES NOT |
| 165 // gurantee anything about their values. For instance notAfter could be |
| 166 // before notBefore, or the dates could indicate an expired certificate. |
| 167 // Consumers are responsible for testing expiration. |
| 168 der::GeneralizedTime validity_not_before; |
| 169 der::GeneralizedTime validity_not_after; |
160 | 170 |
161 // Corresponds with "subject" from RFC 5280: | 171 // Corresponds with "subject" from RFC 5280: |
162 // subject Name, | 172 // subject Name, |
163 // | 173 // |
164 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 174 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
165 // guarantees are made regarding the value of this SEQUENCE. | 175 // guarantees are made regarding the value of this SEQUENCE. |
166 der::Input subject_tlv; | 176 der::Input subject_tlv; |
167 | 177 |
168 // Corresponds with "subjectPublicKeyInfo" from RFC 5280: | 178 // Corresponds with "subjectPublicKeyInfo" from RFC 5280: |
169 // subjectPublicKeyInfo SubjectPublicKeyInfo, | 179 // subjectPublicKeyInfo SubjectPublicKeyInfo, |
(...skipping 30 matching lines...) Expand all Loading... |
200 // EXPLICIT outer tag is stripped.) | 210 // EXPLICIT outer tag is stripped.) |
201 // | 211 // |
202 // Parsing guarantees that if extensions is present the version is v3. | 212 // Parsing guarantees that if extensions is present the version is v3. |
203 bool has_extensions = false; | 213 bool has_extensions = false; |
204 der::Input extensions_tlv; | 214 der::Input extensions_tlv; |
205 }; | 215 }; |
206 | 216 |
207 } // namespace net | 217 } // namespace net |
208 | 218 |
209 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ | 219 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ |
OLD | NEW |