| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 78 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
| 79 // guarantees are made regarding the value of this SEQUENCE. | 79 // guarantees are made regarding the value of this SEQUENCE. |
| 80 // This can be further parsed using ParseTbsCertificate(). | 80 // This can be further parsed using ParseTbsCertificate(). |
| 81 // | 81 // |
| 82 // The |out_signature_algorithm_tlv| parameter corresponds with | 82 // The |out_signature_algorithm_tlv| parameter corresponds with |
| 83 // "signatureAlgorithm" from RFC 5280: | 83 // "signatureAlgorithm" from RFC 5280: |
| 84 // signatureAlgorithm AlgorithmIdentifier, | 84 // signatureAlgorithm AlgorithmIdentifier, |
| 85 // | 85 // |
| 86 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 86 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
| 87 // guarantees are made regarding the value of this SEQUENCE. | 87 // guarantees are made regarding the value of this SEQUENCE. |
| 88 // This can be further parsed using SignatureValue::CreateFromDer(). | 88 // This can be further parsed using SignatureValue::Create(). |
| 89 // | 89 // |
| 90 // The |out_signature_value| parameter corresponds with "signatureValue" from | 90 // The |out_signature_value| parameter corresponds with "signatureValue" from |
| 91 // RFC 5280: | 91 // RFC 5280: |
| 92 // signatureValue BIT STRING } | 92 // signatureValue BIT STRING } |
| 93 // | 93 // |
| 94 // Parsing guarantees that this is a valid BIT STRING. | 94 // Parsing guarantees that this is a valid BIT STRING. |
| 95 NET_EXPORT bool ParseCertificate(const der::Input& certificate_tlv, | 95 NET_EXPORT bool ParseCertificate(const der::Input& certificate_tlv, |
| 96 der::Input* out_tbs_certificate_tlv, | 96 der::Input* out_tbs_certificate_tlv, |
| 97 der::Input* out_signature_algorithm_tlv, | 97 der::Input* out_signature_algorithm_tlv, |
| 98 der::BitString* out_signature_value, | 98 der::BitString* out_signature_value, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // the serial number is at most 20 bytes long. Parsing does NOT guarantee | 176 // the serial number is at most 20 bytes long. Parsing does NOT guarantee |
| 177 // that the integer is positive (might be zero or negative). | 177 // that the integer is positive (might be zero or negative). |
| 178 der::Input serial_number; | 178 der::Input serial_number; |
| 179 | 179 |
| 180 // Corresponds with "signatureAlgorithm" from RFC 5280: | 180 // Corresponds with "signatureAlgorithm" from RFC 5280: |
| 181 // signatureAlgorithm AlgorithmIdentifier, | 181 // signatureAlgorithm AlgorithmIdentifier, |
| 182 // | 182 // |
| 183 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 183 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
| 184 // guarantees are made regarding the value of this SEQUENCE. | 184 // guarantees are made regarding the value of this SEQUENCE. |
| 185 // | 185 // |
| 186 // This can be further parsed using SignatureValue::CreateFromDer(). | 186 // This can be further parsed using SignatureValue::Create(). |
| 187 der::Input signature_algorithm_tlv; | 187 der::Input signature_algorithm_tlv; |
| 188 | 188 |
| 189 // Corresponds with "issuer" from RFC 5280: | 189 // Corresponds with "issuer" from RFC 5280: |
| 190 // issuer Name, | 190 // issuer Name, |
| 191 // | 191 // |
| 192 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No | 192 // This contains the full (unverified) Tag-Length-Value for a SEQUENCE. No |
| 193 // guarantees are made regarding the value of this SEQUENCE. | 193 // guarantees are made regarding the value of this SEQUENCE. |
| 194 der::Input issuer_tlv; | 194 der::Input issuer_tlv; |
| 195 | 195 |
| 196 // Corresponds with "validity" from RFC 5280: | 196 // Corresponds with "validity" from RFC 5280: |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // accessLocation types other than uniformResourceIdentifier are silently | 453 // accessLocation types other than uniformResourceIdentifier are silently |
| 454 // ignored. | 454 // ignored. |
| 455 NET_EXPORT bool ParseAuthorityInfoAccess( | 455 NET_EXPORT bool ParseAuthorityInfoAccess( |
| 456 const der::Input& authority_info_access_tlv, | 456 const der::Input& authority_info_access_tlv, |
| 457 std::vector<base::StringPiece>* out_ca_issuers_uris, | 457 std::vector<base::StringPiece>* out_ca_issuers_uris, |
| 458 std::vector<base::StringPiece>* out_ocsp_uris) WARN_UNUSED_RESULT; | 458 std::vector<base::StringPiece>* out_ocsp_uris) WARN_UNUSED_RESULT; |
| 459 | 459 |
| 460 } // namespace net | 460 } // namespace net |
| 461 | 461 |
| 462 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ | 462 #endif // NET_CERT_INTERNAL_PARSE_CERTIFICATE_H_ |
| OLD | NEW |