Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 // In dotted notation: 1.3.6.1.5.5.7.48.2 | 350 // In dotted notation: 1.3.6.1.5.5.7.48.2 |
| 351 NET_EXPORT der::Input AdCaIssuersOid(); | 351 NET_EXPORT der::Input AdCaIssuersOid(); |
| 352 | 352 |
| 353 // From RFC 5280: | 353 // From RFC 5280: |
| 354 // | 354 // |
| 355 // id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 } | 355 // id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 } |
| 356 // | 356 // |
| 357 // In dotted notation: 1.3.6.1.5.5.7.48.1 | 357 // In dotted notation: 1.3.6.1.5.5.7.48.1 |
| 358 NET_EXPORT der::Input AdOcspOid(); | 358 NET_EXPORT der::Input AdOcspOid(); |
| 359 | 359 |
| 360 // From RFC 5280: | |
| 361 // | |
| 362 // id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::= { id-ce 54 } | |
| 363 // | |
| 364 // In dotted notation: 2.5.29.54 | |
| 365 NET_EXPORT der::Input InhibitAnyPolicyOid(); | |
| 366 | |
| 360 // Parses the Extensions sequence as defined by RFC 5280. Extensions are added | 367 // Parses the Extensions sequence as defined by RFC 5280. Extensions are added |
| 361 // to the map |extensions| keyed by the OID. Parsing guarantees that each OID | 368 // to the map |extensions| keyed by the OID. Parsing guarantees that each OID |
| 362 // is unique. Note that certificate verification must consume each extension | 369 // is unique. Note that certificate verification must consume each extension |
| 363 // marked as critical. | 370 // marked as critical. |
| 364 // | 371 // |
| 365 // Returns true on success and fills |extensions|. The output will reference | 372 // Returns true on success and fills |extensions|. The output will reference |
| 366 // bytes in |extensions_tlv|, so that data must be kept alive. | 373 // bytes in |extensions_tlv|, so that data must be kept alive. |
| 367 // On failure |extensions| may be partially written to and should not be used. | 374 // On failure |extensions| may be partially written to and should not be used. |
| 368 NET_EXPORT bool ParseExtensions( | 375 NET_EXPORT bool ParseExtensions( |
| 369 const der::Input& extensions_tlv, | 376 const der::Input& extensions_tlv, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 464 bool has_inhibit_policy_mapping = false; | 471 bool has_inhibit_policy_mapping = false; |
| 465 uint8_t inhibit_policy_mapping = 0; | 472 uint8_t inhibit_policy_mapping = 0; |
| 466 }; | 473 }; |
| 467 | 474 |
| 468 // Parses a PolicyConstraints SEQUENCE as defined by RFC 5280. Returns true on | 475 // Parses a PolicyConstraints SEQUENCE as defined by RFC 5280. Returns true on |
| 469 // success, and sets |out|. | 476 // success, and sets |out|. |
| 470 NET_EXPORT bool ParsePolicyConstraints(const der::Input& policy_constraints_tlv, | 477 NET_EXPORT bool ParsePolicyConstraints(const der::Input& policy_constraints_tlv, |
| 471 ParsedPolicyConstraints* out) | 478 ParsedPolicyConstraints* out) |
| 472 WARN_UNUSED_RESULT; | 479 WARN_UNUSED_RESULT; |
| 473 | 480 |
| 481 // Parses an InhibitAnyPolicy as defined by RFC 5280. Returns true on success, | |
| 482 // and sets |out|. | |
| 483 NET_EXPORT bool ParseInhibitAnyPolicy(const der::Input& inhibit_any_policy_tlv, | |
|
mattm
2017/05/10 20:11:31
same question as other CL: should these go in cert
eroman
2017/05/15 22:44:05
Done.
| |
| 484 uint8_t* out) WARN_UNUSED_RESULT; | |
| 485 | |
| 474 } // namespace net | 486 } // namespace net |
| 475 | 487 |
| 476 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ | 488 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ |
| OLD | NEW |