Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: net/cert/internal/trust_store_in_memory.h

Issue 2919863003: Fix a reachable LOG(ERROR) from path builder unit-test. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TRUST_STORE_IN_MEMORY_H_ 5 #ifndef NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
6 #define NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ 6 #define NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // Adds a certificate as a trust achor and extracts anchor constraints from 31 // Adds a certificate as a trust achor and extracts anchor constraints from
32 // the certificate. See VerifyCertificateChain for details. 32 // the certificate. See VerifyCertificateChain for details.
33 void AddTrustAnchorWithConstraints(scoped_refptr<ParsedCertificate> cert); 33 void AddTrustAnchorWithConstraints(scoped_refptr<ParsedCertificate> cert);
34 34
35 // TODO(eroman): This is marked "ForTest" as the current implementation 35 // TODO(eroman): This is marked "ForTest" as the current implementation
36 // requires an exact match on the certificate DER (a wider match by say 36 // requires an exact match on the certificate DER (a wider match by say
37 // issuer/serial is probably what we would want for a real implementation). 37 // issuer/serial is probably what we would want for a real implementation).
38 void AddDistrustedCertificateForTest(scoped_refptr<ParsedCertificate> cert); 38 void AddDistrustedCertificateForTest(scoped_refptr<ParsedCertificate> cert);
39 39
40 // Adds a certificate to the store, that is neither trusted nor untrusted.
41 void AddCertificateWithUnspecifiedTrust(
42 scoped_refptr<ParsedCertificate> cert);
43
40 // TrustStore implementation: 44 // TrustStore implementation:
41 void SyncGetIssuersOf(const ParsedCertificate* cert, 45 void SyncGetIssuersOf(const ParsedCertificate* cert,
42 ParsedCertificateList* issuers) override; 46 ParsedCertificateList* issuers) override;
43 void GetTrust(const scoped_refptr<ParsedCertificate>& cert, 47 void GetTrust(const scoped_refptr<ParsedCertificate>& cert,
44 CertificateTrust* trust) const override; 48 CertificateTrust* trust) const override;
45 49
46 // Returns true if the trust store contains the given ParsedCertificate 50 // Returns true if the trust store contains the given ParsedCertificate
47 // (matches by DER). 51 // (matches by DER).
48 bool Contains(const ParsedCertificate* cert) const; 52 bool Contains(const ParsedCertificate* cert) const;
49 53
(...skipping 15 matching lines...) Expand all
65 // distrusted certificates require a full DER match. 69 // distrusted certificates require a full DER match.
66 void AddCertificate(scoped_refptr<ParsedCertificate> cert, 70 void AddCertificate(scoped_refptr<ParsedCertificate> cert,
67 const CertificateTrust& trust); 71 const CertificateTrust& trust);
68 72
69 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory); 73 DISALLOW_COPY_AND_ASSIGN(TrustStoreInMemory);
70 }; 74 };
71 75
72 } // namespace net 76 } // namespace net
73 77
74 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_ 78 #endif // NET_CERT_INTERNAL_TRUST_STORE_IN_MEMORY_H_
OLDNEW
« no previous file with comments | « net/cert/internal/path_builder_verify_certificate_chain_unittest.cc ('k') | net/cert/internal/trust_store_in_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698