Commit 6fdf89d4 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Rename function ParseCertificate to be unique (net/)

When building using Jumbo unnamed namespaces gets merged
and functions with the same name conflict. This happens
for the function kParseCertificate defined in:
net/cert/internal/ocsp.cc
net/cert/internal/parse_certificate.cc

This commit solves the issue by renaming the function in
net/cert/internal/ocsp.cc.

Bug: 772146
Change-Id: I071682c8f330183f637a7985061980b6aa34c93a
Reviewed-on: https://chromium-review.googlesource.com/1119911Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571848}
parent 3178e315
......@@ -534,7 +534,7 @@ bool CheckCertIDMatchesCertificate(
// TODO(eroman): Revisit how certificate parsing is used by this file. Ideally
// would either pass in the parsed bits, or have a better abstraction for lazily
// parsing.
scoped_refptr<ParsedCertificate> ParseCertificate(base::StringPiece der) {
scoped_refptr<ParsedCertificate> OCSPParseCertificate(base::StringPiece der) {
ParseCertificateOptions parse_options;
parse_options.allow_invalid_serial_numbers = true;
......@@ -640,7 +640,7 @@ WARN_UNUSED_RESULT bool VerifyOCSPResponseSignature(
// (3) Has signed the OCSP response using its public key.
for (const auto& responder_cert_tlv : response.certs) {
scoped_refptr<ParsedCertificate> cur_responder_certificate =
ParseCertificate(responder_cert_tlv.AsStringPiece());
OCSPParseCertificate(responder_cert_tlv.AsStringPiece());
// If failed parsing the certificate, keep looking.
if (!cur_responder_certificate)
......@@ -778,9 +778,9 @@ OCSPRevocationStatus CheckOCSP(
}
scoped_refptr<ParsedCertificate> certificate =
ParseCertificate(certificate_der);
OCSPParseCertificate(certificate_der);
scoped_refptr<ParsedCertificate> issuer_certificate =
ParseCertificate(issuer_certificate_der);
OCSPParseCertificate(issuer_certificate_der);
if (!certificate || !issuer_certificate) {
*response_details = OCSPVerifyResult::NOT_CHECKED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment