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 11 matching lines...) Expand all Loading... |
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/base/cert_database.h" |
31 #include "net/base/nss_cert_database.h" | 31 #include "net/base/nss_cert_database.h" |
| 32 #include "third_party/icu/public/i18n/unicode/coll.h" // icu::Collator |
32 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/base/l10n/l10n_util_collator.h" | 34 #include "ui/base/l10n/l10n_util_collator.h" |
34 #include "unicode/coll.h" // icu::Collator | |
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 |
42 // Root CA certificates that are built into Chrome use this token name. | 42 // Root CA certificates that are built into Chrome use this token name. |
43 const char kRootCertificateTokenName[] = "Builtin Object Token"; | 43 const char kRootCertificateTokenName[] = "Builtin Object Token"; |
44 | 44 |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 net::X509Certificate* cert = GetCertificateAt(index); | 599 net::X509Certificate* cert = GetCertificateAt(index); |
600 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); | 600 net::X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle(); |
601 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); | 601 std::string id = x509_certificate_model::GetPkcs11Id(cert_handle); |
602 if (id == pkcs11_id) | 602 if (id == pkcs11_id) |
603 return index; | 603 return index; |
604 } | 604 } |
605 return -1; // Not found. | 605 return -1; // Not found. |
606 } | 606 } |
607 | 607 |
608 } // chromeos | 608 } // chromeos |
OLD | NEW |