OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/cert/cert_database.h" | 5 #include "net/cert/cert_database.h" |
6 | 6 |
7 #include <openssl/x509.h> | 7 #include <openssl/x509.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/observer_list_threadsafe.h" | 10 #include "base/observer_list_threadsafe.h" |
11 #include "crypto/openssl_util.h" | 11 #include "crypto/openssl_util.h" |
12 #include "net/base/crypto_module.h" | 12 #include "net/base/crypto_module.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/base/openssl_private_key_store.h" | 14 #include "net/base/openssl_private_key_store.h" |
15 #include "net/cert/x509_certificate.h" | 15 #include "net/cert/x509_certificate.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 CertDatabase::CertDatabase() | 19 CertDatabase::CertDatabase() |
20 : observer_list_(new ObserverListThreadSafe<Observer>) { | 20 : observer_list_(new ObserverListThreadSafe<Observer>) { |
21 } | 21 } |
22 | 22 |
23 CertDatabase::~CertDatabase() {} | 23 CertDatabase::~CertDatabase() { |
| 24 } |
24 | 25 |
25 // This method is used to check a client certificate before trying to | 26 // This method is used to check a client certificate before trying to |
26 // install it on the system, which will happen later by calling | 27 // install it on the system, which will happen later by calling |
27 // AddUserCert() below. | 28 // AddUserCert() below. |
28 // | 29 // |
29 // On the Linux/OpenSSL build, there is simply no system keystore, but | 30 // On the Linux/OpenSSL build, there is simply no system keystore, but |
30 // OpenSSLPrivateKeyStore() implements a small in-memory store for | 31 // OpenSSLPrivateKeyStore() implements a small in-memory store for |
31 // (public/private) key pairs generated through keygen. | 32 // (public/private) key pairs generated through keygen. |
32 // | 33 // |
33 // Try to check for a private key in the in-memory store to check | 34 // Try to check for a private key in the in-memory store to check |
(...skipping 15 matching lines...) Expand all Loading... |
49 return OK; | 50 return OK; |
50 } | 51 } |
51 | 52 |
52 int CertDatabase::AddUserCert(X509Certificate* cert) { | 53 int CertDatabase::AddUserCert(X509Certificate* cert) { |
53 // There is no certificate store on the Linux/OpenSSL build. | 54 // There is no certificate store on the Linux/OpenSSL build. |
54 NOTIMPLEMENTED(); | 55 NOTIMPLEMENTED(); |
55 return ERR_NOT_IMPLEMENTED; | 56 return ERR_NOT_IMPLEMENTED; |
56 } | 57 } |
57 | 58 |
58 } // namespace net | 59 } // namespace net |
OLD | NEW |