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/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/observer_list_threadsafe.h" | 10 #include "base/observer_list_threadsafe.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/browser_process.h" // g_browser_process | 14 #include "chrome/browser/browser_process.h" // g_browser_process |
15 #include "chrome/browser/chromeos/cros/cros_library.h" | 15 #include "chrome/browser/chromeos/cros/cros_library.h" |
16 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 16 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
17 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
18 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" | |
19 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
20 #include "chrome/common/net/x509_certificate_model.h" | 18 #include "chrome/common/net/x509_certificate_model.h" |
| 19 #include "chromeos/dbus/cryptohome_client.h" |
| 20 #include "chromeos/dbus/dbus_thread_manager.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "crypto/encryptor.h" | 22 #include "crypto/encryptor.h" |
23 #include "crypto/nss_util.h" | 23 #include "crypto/nss_util.h" |
24 #include "crypto/sha2.h" | 24 #include "crypto/sha2.h" |
25 #include "crypto/symmetric_key.h" | 25 #include "crypto/symmetric_key.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "net/base/cert_database.h" | 27 #include "net/base/cert_database.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 #include "ui/base/l10n/l10n_util_collator.h" | 29 #include "ui/base/l10n/l10n_util_collator.h" |
30 #include "unicode/coll.h" // icu::Collator | 30 #include "unicode/coll.h" // icu::Collator |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 net::X509Certificate* cert = GetCertificateAt(index); | 534 net::X509Certificate* cert = GetCertificateAt(index); |
535 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); | 535 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); |
536 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); | 536 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); |
537 if (id == pkcs11_id) | 537 if (id == pkcs11_id) |
538 return index; | 538 return index; |
539 } | 539 } |
540 return -1; // Not found. | 540 return -1; // Not found. |
541 } | 541 } |
542 | 542 |
543 } // chromeos | 543 } // chromeos |
OLD | NEW |