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

Unified Diff: chrome/browser/chromeos/login/owner_key_utils_unittest.cc

Issue 6538098: [Chrome OS] Owner keys are generated outside Chrome now; handle appropriately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
« no previous file with comments | « chrome/browser/chromeos/login/owner_key_utils.cc ('k') | chrome/browser/chromeos/login/owner_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/owner_key_utils_unittest.cc
diff --git a/chrome/browser/chromeos/login/owner_key_utils_unittest.cc b/chrome/browser/chromeos/login/owner_key_utils_unittest.cc
index 3b21466b01454c6fdc58ce9e88e4d94f1c8fca4b..37e5e5611d08d946b2998a5b1dfe44c3b1b30465 100644
--- a/chrome/browser/chromeos/login/owner_key_utils_unittest.cc
+++ b/chrome/browser/chromeos/login/owner_key_utils_unittest.cc
@@ -28,11 +28,19 @@ class OwnerKeyUtilsTest : public ::testing::Test {
base::OpenPersistentNSSDB();
}
+ // Key generation parameters.
+ static const uint16 kKeySizeInBits;
+
scoped_refptr<OwnerKeyUtils> utils_;
};
+// We're generating and using 2048-bit RSA keys.
+// static
+const uint16 OwnerKeyUtilsTest::kKeySizeInBits = 2048;
+
TEST_F(OwnerKeyUtilsTest, ExportImportPublicKey) {
- scoped_ptr<base::RSAPrivateKey> pair(utils_->GenerateKeyPair());
+ scoped_ptr<base::RSAPrivateKey> pair(
+ base::RSAPrivateKey::CreateSensitive(kKeySizeInBits));
ASSERT_NE(pair.get(), reinterpret_cast<base::RSAPrivateKey*>(NULL));
// Export public key to file.
« no previous file with comments | « chrome/browser/chromeos/login/owner_key_utils.cc ('k') | chrome/browser/chromeos/login/owner_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698