blob: d2f47cc2b0c61a92335fa7e59657b05ec8253875 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/ssl_client_auth_cache.h"
namespace net {
SSLClientAuthCache::SSLClientAuthCache() {}
SSLClientAuthCache::~SSLClientAuthCache() {}
X509Certificate* SSLClientAuthCache::Lookup(const std::string& server) {
AuthCacheMap::iterator iter = cache_.find(server);
return (iter == cache_.end()) ? NULL : iter->second;
}
void SSLClientAuthCache::Add(const std::string& server,
X509Certificate* value) {
cache_[server] = value;
// TODO(wtc): enforce a maximum number of entries.
}
void SSLClientAuthCache::Remove(const std::string& server) {
cache_.erase(server);
}
} // namespace net
|