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

Side by Side Diff: net/base/tls_client_login_cache.h

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/base/ssl_info.cc ('k') | net/base/tls_client_login_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_TLS_CLIENT_LOGIN_CACHE_H_
6 #define NET_BASE_TLS_CLIENT_LOGIN_CACHE_H_
7 #pragma once
8
9 #include <string>
10 #include <map>
11
12 #include "base/ref_counted.h"
13 #include "net/base/auth.h"
14
15 namespace net {
16
17 // The TLSClientLoginCache class is a simple cache structure to store TLS
18 // client login credentials. Provides lookup, insertion, and deletion of
19 // entries. The parameter for doing lookups, insertions, and deletions is
20 // the server's host and port.
21 //
22 // TODO(wtc): This class is based on FtpAuthCache. We can extract the common
23 // code to a template class.
24 class TLSClientLoginCache {
25 public:
26 TLSClientLoginCache();
27 ~TLSClientLoginCache();
28
29 // Checks for cached login credentials for TLS server at |server|.
30 // Returns true if a preference is found, and sets |*tls_auth_data|
31 // to the desired client login credentials.
32 // If cached login credentials are not found, returns false.
33 bool Lookup(const std::string& server,
34 scoped_refptr<AuthData>* tls_auth_data);
35
36 // Add client login credentials for |server| to the cache. If there are
37 // already login credentials for |server|, they will be overwritten.
38 void Add(const std::string& server, AuthData* tls_auth_data);
39
40 // Remove the client certificate for |server| from the cache, if one exists.
41 void Remove(const std::string& server);
42
43 private:
44 typedef std::string AuthCacheKey;
45 typedef scoped_refptr<AuthData> AuthCacheValue;
46 typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap;
47
48 // internal representation of cache, an STL map.
49 AuthCacheMap cache_;
50 };
51
52 } // namespace net
53
54 #endif // NET_BASE_TLS_CLIENT_LOGIN_CACHE_H_
OLDNEW
« no previous file with comments | « net/base/ssl_info.cc ('k') | net/base/tls_client_login_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698