Index: chrome/browser/chromeos/login/owner_key_utils.cc |
diff --git a/chrome/browser/chromeos/login/owner_key_utils.cc b/chrome/browser/chromeos/login/owner_key_utils.cc |
index a47722cf77865ff1725b569d24ee6fd89543e975..c4725ee507c884720815d65897980db4b43ef950 100644 |
--- a/chrome/browser/chromeos/login/owner_key_utils.cc |
+++ b/chrome/browser/chromeos/login/owner_key_utils.cc |
@@ -40,13 +40,6 @@ class OwnerKeyUtilsImpl : public OwnerKeyUtils { |
public: |
OwnerKeyUtilsImpl(); |
- RSAPrivateKey* GenerateKeyPair(); |
- |
- bool ExportPublicKeyViaDbus(RSAPrivateKey* pair, |
- LoginLibrary::Delegate* d); |
- |
- bool ExportPublicKeyToFile(RSAPrivateKey* pair, const FilePath& key_file); |
- |
bool ImportPublicKey(const FilePath& key_file, |
std::vector<uint8>* output); |
@@ -65,14 +58,13 @@ class OwnerKeyUtilsImpl : public OwnerKeyUtils { |
protected: |
virtual ~OwnerKeyUtilsImpl(); |
+ bool ExportPublicKeyToFile(RSAPrivateKey* pair, const FilePath& key_file); |
+ |
private: |
// The file outside the owner's encrypted home directory where her |
// key will live. |
static const char kOwnerKeyFile[]; |
- // Key generation parameters. |
- static const uint16 kKeySizeInBits; |
- |
DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilsImpl); |
}; |
@@ -87,35 +79,10 @@ OwnerKeyUtils* OwnerKeyUtils::Create() { |
// static |
const char OwnerKeyUtilsImpl::kOwnerKeyFile[] = "/var/lib/whitelist/owner.key"; |
-// We're generating and using 2048-bit RSA keys. |
-// static |
-const uint16 OwnerKeyUtilsImpl::kKeySizeInBits = 2048; |
- |
OwnerKeyUtilsImpl::OwnerKeyUtilsImpl() {} |
OwnerKeyUtilsImpl::~OwnerKeyUtilsImpl() {} |
-RSAPrivateKey* OwnerKeyUtilsImpl::GenerateKeyPair() { |
- return RSAPrivateKey::CreateSensitive(kKeySizeInBits); |
-} |
- |
-bool OwnerKeyUtilsImpl::ExportPublicKeyViaDbus(RSAPrivateKey* pair, |
- LoginLibrary::Delegate* d) { |
- DCHECK(pair); |
- bool ok = false; |
- |
- std::vector<uint8> to_export; |
- if (!pair->ExportPublicKey(&to_export)) { |
- LOG(ERROR) << "Formatting key for export via dbus failed!"; |
- return false; |
- } |
- |
- if (CrosLibrary::Get()->EnsureLoaded()) |
- ok = CrosLibrary::Get()->GetLoginLibrary()->SetOwnerKeyAsync(to_export, d); |
- |
- return ok; |
-} |
- |
bool OwnerKeyUtilsImpl::ExportPublicKeyToFile(RSAPrivateKey* pair, |
const FilePath& key_file) { |
DCHECK(pair); |