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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc

Issue 1118263003: Revert of Don't use RSAPrivateKey in NSS integration code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-refactor
Patch Set: 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/ownership/owner_settings_service_chromeos.cc
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
index 4a36a9dd698a2c5799fd878ecafe977c60ffda5a..a96f0aab78e77370c4e8a1185c3974d22f99774d 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
-
-#include <keyhi.h>
#include <algorithm>
#include <string>
@@ -31,9 +29,9 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/content_switches.h"
-#include "crypto/nss_key_util.h"
#include "crypto/nss_util.h"
#include "crypto/nss_util_internal.h"
+#include "crypto/rsa_private_key.h"
#include "crypto/scoped_nss_types.h"
#include "crypto/signature_creator.h"
@@ -126,9 +124,10 @@
std::vector<uint8> public_key;
if (!owner_key_util->ImportPublicKey(&public_key))
return false;
- crypto::ScopedSECKEYPrivateKey key =
- crypto::FindNSSKeyFromPublicKeyInfo(public_key);
- return key && SECKEY_GetPrivateKeyType(key.get()) == rsaKey;
+ scoped_ptr<crypto::RSAPrivateKey> key(
+ crypto::RSAPrivateKey::FindFromPublicKeyInfo(public_key));
+ bool is_owner = key.get() != NULL;
+ return is_owner;
}
// Checks whether NSS slots with private key are mounted or

Powered by Google App Engine
This is Rietveld 408576698