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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/observer_list_threadsafe.h" | 12 #include "base/observer_list_threadsafe.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/browser_process.h" // g_browser_process | 16 #include "chrome/browser/browser_process.h" // g_browser_process |
17 #include "chrome/browser/chromeos/cros/cros_library.h" | 17 #include "chrome/browser/chromeos/cros/cros_library.h" |
18 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 18 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
19 #include "chrome/browser/chromeos/login/user_manager.h" | 19 #include "chrome/browser/chromeos/login/user_manager.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/net/x509_certificate_model.h" | 21 #include "chrome/common/net/x509_certificate_model.h" |
22 #include "chromeos/dbus/cryptohome_client.h" | 22 #include "chromeos/dbus/cryptohome_client.h" |
23 #include "chromeos/dbus/dbus_thread_manager.h" | 23 #include "chromeos/dbus/dbus_thread_manager.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "crypto/encryptor.h" | 25 #include "crypto/encryptor.h" |
26 #include "crypto/nss_util.h" | 26 #include "crypto/nss_util.h" |
27 #include "crypto/sha2.h" | 27 #include "crypto/sha2.h" |
28 #include "crypto/symmetric_key.h" | 28 #include "crypto/symmetric_key.h" |
29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
30 #include "net/base/cert_database.h" | 30 #include "net/cert/cert_database.h" |
31 #include "net/base/nss_cert_database.h" | 31 #include "net/cert/nss_cert_database.h" |
32 #include "third_party/icu/public/i18n/unicode/coll.h" // icu::Collator | 32 #include "third_party/icu/public/i18n/unicode/coll.h" // icu::Collator |
33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/base/l10n/l10n_util_collator.h" | 34 #include "ui/base/l10n/l10n_util_collator.h" |
35 | 35 |
36 using content::BrowserThread; | 36 using content::BrowserThread; |
37 | 37 |
38 namespace chromeos { | 38 namespace chromeos { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 net::X509Certificate* cert = GetCertificateAt(index); | 667 net::X509Certificate* cert = GetCertificateAt(index); |
668 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); | 668 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); |
669 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); | 669 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); |
670 if (id == pkcs11_id) | 670 if (id == pkcs11_id) |
671 return index; | 671 return index; |
672 } | 672 } |
673 return -1; // Not found. | 673 return -1; // Not found. |
674 } | 674 } |
675 | 675 |
676 } // chromeos | 676 } // chromeos |
OLD | NEW |