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 "chrome/browser/chromeos/cros/cert_library.h" | 5 #include "chrome/browser/chromeos/cros/cert_library.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/chromeos/chromeos_version.h" | 9 #include "base/chromeos/chromeos_version.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 class CertLibraryImplStub : public CertLibrary { | 602 class CertLibraryImplStub : public CertLibrary { |
603 public: | 603 public: |
604 CertLibraryImplStub() | 604 CertLibraryImplStub() |
605 : token_name_("StubToken"), | 605 : token_name_("StubToken"), |
606 ALLOW_THIS_IN_INITIALIZER_LIST(cert_list_(this)) { | 606 ALLOW_THIS_IN_INITIALIZER_LIST(cert_list_(this)) { |
607 } | 607 } |
608 virtual ~CertLibraryImplStub() {} | 608 virtual ~CertLibraryImplStub() {} |
609 | 609 |
610 virtual void AddObserver(Observer* observer) {} | 610 virtual void AddObserver(Observer* observer) {} |
611 virtual void RemoveObserver(Observer* observer) {} | 611 virtual void RemoveObserver(Observer* observer) {} |
612 virtual void LoadKeyStore() {} | 612 virtual void LoadKeyStore() { |
613 crypto::OpenPersistentNSSDB(); | |
Joao da Silva
2013/04/08 14:58:59
This shouldn't go in.
dconnelly
2013/04/08 15:01:57
Done.
| |
614 } | |
613 virtual bool CertificatesLoading() const { | 615 virtual bool CertificatesLoading() const { |
614 return false; | 616 return false; |
615 } | 617 } |
616 virtual bool CertificatesLoaded() const { | 618 virtual bool CertificatesLoaded() const { |
617 return true; | 619 return true; |
618 } | 620 } |
619 virtual bool IsHardwareBacked() const { | 621 virtual bool IsHardwareBacked() const { |
620 return false; | 622 return false; |
621 } | 623 } |
622 virtual const std::string& GetTpmTokenName() const { | 624 virtual const std::string& GetTpmTokenName() const { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 net::X509Certificate* cert = GetCertificateAt(index); | 729 net::X509Certificate* cert = GetCertificateAt(index); |
728 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); | 730 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); |
729 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); | 731 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); |
730 if (id == pkcs11_id) | 732 if (id == pkcs11_id) |
731 return index; | 733 return index; |
732 } | 734 } |
733 return -1; // Not found. | 735 return -1; // Not found. |
734 } | 736 } |
735 | 737 |
736 } // chromeos | 738 } // chromeos |
OLD | NEW |