| Index: net/cert/internal/parse_certificate.h
|
| diff --git a/net/cert/internal/parse_certificate.h b/net/cert/internal/parse_certificate.h
|
| index 13409dc3be54896d4287629f933a9be90d269e5c..2277a4e8efc05b7b9418be37ae2a116154987c42 100644
|
| --- a/net/cert/internal/parse_certificate.h
|
| +++ b/net/cert/internal/parse_certificate.h
|
| @@ -17,6 +17,7 @@
|
|
|
| namespace net {
|
|
|
| +class CertErrors;
|
| struct ParsedTbsCertificate;
|
|
|
| // Returns true if the given serial number (CertificateSerialNumber in RFC 5280)
|
| @@ -55,14 +56,17 @@ struct NET_EXPORT ParseCertificateOptions {
|
| };
|
|
|
| // Parses a DER-encoded "Certificate" as specified by RFC 5280. Returns true on
|
| -// success and sets the results in the |out_*| parameters.
|
| +// success and sets the results in the |out_*| parameters. On both the failure
|
| +// and success case, if |out_errors| was non-null it may contain extra error
|
| +// information.
|
| //
|
| // Note that on success the out parameters alias data from the input
|
| // |certificate_tlv|. Hence the output values are only valid as long as
|
| // |certificate_tlv| remains valid.
|
| //
|
| -// On failure the out parameters have an undefined state. Some of them may have
|
| -// been updated during parsing, whereas others may not have been changed.
|
| +// On failure the out parameters have an undefined state, except for
|
| +// out_errors. Some of them may have been updated during parsing, whereas
|
| +// others may not have been changed.
|
| //
|
| // The out parameters represent each field of the Certificate SEQUENCE:
|
| // Certificate ::= SEQUENCE {
|
| @@ -91,8 +95,8 @@ struct NET_EXPORT ParseCertificateOptions {
|
| NET_EXPORT bool ParseCertificate(const der::Input& certificate_tlv,
|
| der::Input* out_tbs_certificate_tlv,
|
| der::Input* out_signature_algorithm_tlv,
|
| - der::BitString* out_signature_value)
|
| - WARN_UNUSED_RESULT;
|
| + der::BitString* out_signature_value,
|
| + CertErrors* out_errors) WARN_UNUSED_RESULT;
|
|
|
| // Parses a DER-encoded "TBSCertificate" as specified by RFC 5280. Returns true
|
| // on success and sets the results in |out|. Certain invalid inputs may
|
|
|