Index: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc |
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc |
index 2607ace7cd84157a9f94fb0a4a99ec2b54323a67..c96e922adc1e9bbe568c771d455df5158bd22dd5 100644 |
--- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc |
+++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc |
@@ -45,6 +45,7 @@ |
#include "components/ownership/mock_owner_key_util.h" |
#include "components/user_manager/fake_user_manager.h" |
#include "content/public/test/test_browser_thread_bundle.h" |
+#include "crypto/nss_key_util.h" |
#include "crypto/nss_util_internal.h" |
#include "crypto/scoped_test_nss_chromeos_user.h" |
#include "google_apis/gaia/mock_url_fetcher_factory.h" |
@@ -118,11 +119,11 @@ std::vector<uint8> GetOwnerPublicKey() { |
kOwnerPublicKey + arraysize(kOwnerPublicKey)); |
} |
-scoped_ptr<crypto::RSAPrivateKey> CreateOwnerKeyInSlot(PK11SlotInfo* slot) { |
+bool CreateOwnerKeyInSlot(PK11SlotInfo* slot) { |
const std::vector<uint8> key(kOwnerPrivateKey, |
kOwnerPrivateKey + arraysize(kOwnerPrivateKey)); |
- return make_scoped_ptr( |
- crypto::RSAPrivateKey::CreateSensitiveFromPrivateKeyInfo(slot, key)); |
+ return crypto::ImportNSSKeyFromPrivateKeyInfo(slot, key, |
+ true /* permanent */); |
} |
} // namespace |
@@ -472,7 +473,7 @@ TEST_F(CryptohomeAuthenticatorTest, ResolveOwnerNeededSuccess) { |
crypto::ScopedPK11Slot user_slot( |
crypto::GetPublicSlotForChromeOSUser(user_context_.GetUserIDHash())); |
- CreateOwnerKeyInSlot(user_slot.get()); |
+ ASSERT_TRUE(CreateOwnerKeyInSlot(user_slot.get())); |
profile_manager_.reset( |
new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |