Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5107)

Unified Diff: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc

Issue 1106103003: Don't use RSAPrivateKey in NSS integration code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-refactor
Patch Set: sleevi comments Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..03797d8c700b1de4fa3d01298429d49039ad2549 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) {
+crypto::ScopedSECKEYPrivateKey CreateOwnerKeyInSlot(PK11SlotInfo* slot) {
pneubeck (no reviews) 2015/04/28 09:56:26 just drop the return type, it's anyways not used.
davidben 2015/04/28 16:27:45 Switched it to a bool + ASSERT_TRUE.
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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc » ('j') | crypto/nss_key_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698