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

Side by Side Diff: net/ssl/ssl_client_auth_cache.h

Issue 2363653002: Cleanup unreachable cert adding code (Closed)
Patch Set: Rebased Created 4 years, 2 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
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/ssl/ssl_client_auth_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SSL_SSL_CLIENT_AUTH_CACHE_H_ 5 #ifndef NET_SSL_SSL_CLIENT_AUTH_CACHE_H_
6 #define NET_SSL_SSL_CLIENT_AUTH_CACHE_H_ 6 #define NET_SSL_SSL_CLIENT_AUTH_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // overwritten. A NULL |client_cert| indicates a preference that no client 46 // overwritten. A NULL |client_cert| indicates a preference that no client
47 // certificate should be sent to |server|. 47 // certificate should be sent to |server|.
48 void Add(const HostPortPair& server, 48 void Add(const HostPortPair& server,
49 X509Certificate* client_cert, 49 X509Certificate* client_cert,
50 SSLPrivateKey* private_key); 50 SSLPrivateKey* private_key);
51 51
52 // Remove the client certificate for |server| from the cache, if one exists. 52 // Remove the client certificate for |server| from the cache, if one exists.
53 void Remove(const HostPortPair& server); 53 void Remove(const HostPortPair& server);
54 54
55 // CertDatabase::Observer methods: 55 // CertDatabase::Observer methods:
56 void OnCertAdded(const X509Certificate* cert) override; 56 void OnCertDBChanged(const X509Certificate* cert) override;
57 57
58 private: 58 private:
59 typedef HostPortPair AuthCacheKey; 59 typedef HostPortPair AuthCacheKey;
60 typedef std::pair<scoped_refptr<X509Certificate>, 60 typedef std::pair<scoped_refptr<X509Certificate>,
61 scoped_refptr<SSLPrivateKey>> AuthCacheValue; 61 scoped_refptr<SSLPrivateKey>> AuthCacheValue;
62 typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap; 62 typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap;
63 63
64 // internal representation of cache, an STL map. 64 // internal representation of cache, an STL map.
65 AuthCacheMap cache_; 65 AuthCacheMap cache_;
66 }; 66 };
67 67
68 } // namespace net 68 } // namespace net
69 69
70 #endif // NET_SSL_SSL_CLIENT_AUTH_CACHE_H_ 70 #endif // NET_SSL_SSL_CLIENT_AUTH_CACHE_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/ssl/ssl_client_auth_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698