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

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

Issue 2832703002: Allow the TrustStore interface to return matching intermediates, and identify distrusted certs. (Closed)
Patch Set: mac fix Created 3 years, 8 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_H_ 5 #ifndef NET_CERT_INTERNAL_TRUST_STORE_H_
6 #define NET_CERT_INTERNAL_TRUST_STORE_H_ 6 #define NET_CERT_INTERNAL_TRUST_STORE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 }; 110 };
111 111
112 using TrustAnchors = std::vector<scoped_refptr<TrustAnchor>>; 112 using TrustAnchors = std::vector<scoped_refptr<TrustAnchor>>;
113 113
114 // Interface for finding trust anchors. 114 // Interface for finding trust anchors.
115 class NET_EXPORT TrustStore { 115 class NET_EXPORT TrustStore {
116 public: 116 public:
117 TrustStore(); 117 TrustStore();
118 virtual ~TrustStore(); 118 virtual ~TrustStore();
119 119
120 // Appends the trust anchors that match |cert|'s issuer name to |*matches|. 120 // Looks up candidate [1] issuers for |cert| in the trust store and appends
121 // |cert| and |matches| must not be null. 121 // them to the provided out-parameters.
122 virtual void FindTrustAnchorsForCert( 122 //
123 const scoped_refptr<ParsedCertificate>& cert, 123 // [1] The identified trust anchors and itermediates are merely "candidates"
mattm 2017/04/20 03:19:07 intermediates
124 TrustAnchors* matches) const = 0; 124 // in that they may not pass certificate validation. However by some heuristic
125 // (issuer key ID, issuer name) they look like matches.
126 virtual void FindIssuers(const scoped_refptr<ParsedCertificate>& cert,
127 TrustAnchors* trust_anchors,
128 ParsedCertificateList* intermediates) const = 0;
129
130 // Returns true if |cert| is actively distrusted by this trust store.
131 virtual bool IsBlacklisted(const scoped_refptr<ParsedCertificate>& cert) const
mattm 2017/04/20 03:19:07 If we still need to do a separate trust store chec
eroman 2017/04/20 18:20:11 I generally like that, however if we go that route
132 WARN_UNUSED_RESULT = 0;
125 133
126 private: 134 private:
127 DISALLOW_COPY_AND_ASSIGN(TrustStore); 135 DISALLOW_COPY_AND_ASSIGN(TrustStore);
128 }; 136 };
129 137
130 } // namespace net 138 } // namespace net
131 139
132 #endif // NET_CERT_INTERNAL_TRUST_STORE_H_ 140 #endif // NET_CERT_INTERNAL_TRUST_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698