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 5993b9c18c653e585d99ac94aca1365dd9539874..606563708ae98da1df7bc8e0412616eb28a0d9df 100644 |
--- a/net/cert/internal/verify_certificate_chain_pkits_unittest.cc |
+++ b/net/cert/internal/verify_certificate_chain_pkits_unittest.cc |
@@ -43,18 +43,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, |
@@ -65,7 +53,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. |