| Index: net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| diff --git a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| index 98b0e7b800aa5a1c9fec16a9060682599f269a2f..ee559584cf610bde7ef5d2becda059bb7f7bdb20 100644
|
| --- a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| +++ b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
|
| @@ -47,18 +47,6 @@ namespace net {
|
|
|
| namespace {
|
|
|
| -// Adds the certificate |cert_der| as a trust anchor to |trust_store|.
|
| -void AddCertificateToTrustStore(const std::string& cert_der,
|
| - TrustStore* trust_store) {
|
| - ParsedCertificate cert;
|
| - ASSERT_TRUE(ParseCertificate(der::Input(&cert_der), &cert));
|
| -
|
| - ParsedTbsCertificate tbs;
|
| - ASSERT_TRUE(ParseTbsCertificate(cert.tbs_certificate_tlv, &tbs));
|
| - TrustAnchor anchor = {tbs.spki_tlv.AsString(), tbs.subject_tlv.AsString()};
|
| - trust_store->anchors.push_back(anchor);
|
| -}
|
| -
|
| class VerifyCertificateChainPkitsTestDelegate {
|
| public:
|
| static bool Verify(std::vector<std::string> cert_ders,
|
| @@ -69,7 +57,7 @@ class VerifyCertificateChainPkitsTestDelegate {
|
| }
|
| // First entry in the PKITS chain is the trust anchor.
|
| TrustStore trust_store;
|
| - AddCertificateToTrustStore(cert_ders[0], &trust_store);
|
| + EXPECT_TRUE(trust_store.AddTrustedCertificate(cert_ders[0]));
|
|
|
| // PKITS lists chains from trust anchor to target, VerifyCertificateChain
|
| // takes them starting with the target and not including the trust anchor.
|
|
|