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/nss_cert_database.h" | 5 #include "net/cert/nss_cert_database.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <certdb.h> | 8 #include <certdb.h> |
9 #include <keyhi.h> | 9 #include <keyhi.h> |
10 #include <pk11pub.h> | 10 #include <pk11pub.h> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 NSSCertDatabase::ImportCertFailure::~ImportCertFailure() {} | 42 NSSCertDatabase::ImportCertFailure::~ImportCertFailure() {} |
43 | 43 |
44 // static | 44 // static |
45 NSSCertDatabase* NSSCertDatabase::GetInstance() { | 45 NSSCertDatabase* NSSCertDatabase::GetInstance() { |
46 return Singleton<NSSCertDatabase, | 46 return Singleton<NSSCertDatabase, |
47 LeakySingletonTraits<NSSCertDatabase> >::get(); | 47 LeakySingletonTraits<NSSCertDatabase> >::get(); |
48 } | 48 } |
49 | 49 |
50 NSSCertDatabase::NSSCertDatabase() | 50 NSSCertDatabase::NSSCertDatabase() |
51 : observer_list_(new ObserverListThreadSafe<Observer>) { | 51 : observer_list_(new ObserverListThreadSafe<Observer>) { |
| 52 LOG(ERROR) << "HIIIIIIIIIIIIIIIIIIIIIIIIIII"; |
52 crypto::EnsureNSSInit(); | 53 crypto::EnsureNSSInit(); |
53 psm::EnsurePKCS12Init(); | 54 psm::EnsurePKCS12Init(); |
54 } | 55 } |
55 | 56 |
56 NSSCertDatabase::~NSSCertDatabase() {} | 57 NSSCertDatabase::~NSSCertDatabase() {} |
57 | 58 |
58 void NSSCertDatabase::ListCerts(CertificateList* certs) { | 59 void NSSCertDatabase::ListCerts(CertificateList* certs) { |
59 certs->clear(); | 60 certs->clear(); |
60 | 61 |
61 CERTCertList* cert_list = PK11_ListCerts(PK11CertListUnique, NULL); | 62 CERTCertList* cert_list = PK11_ListCerts(PK11CertListUnique, NULL); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 observer_list_->Notify(&Observer::OnCertRemoved, make_scoped_refptr(cert)); | 337 observer_list_->Notify(&Observer::OnCertRemoved, make_scoped_refptr(cert)); |
337 } | 338 } |
338 | 339 |
339 void NSSCertDatabase::NotifyObserversOfCertTrustChanged( | 340 void NSSCertDatabase::NotifyObserversOfCertTrustChanged( |
340 const X509Certificate* cert) { | 341 const X509Certificate* cert) { |
341 observer_list_->Notify( | 342 observer_list_->Notify( |
342 &Observer::OnCertTrustChanged, make_scoped_refptr(cert)); | 343 &Observer::OnCertTrustChanged, make_scoped_refptr(cert)); |
343 } | 344 } |
344 | 345 |
345 } // namespace net | 346 } // namespace net |
OLD | NEW |