summaryrefslogtreecommitdiffstats
path: root/rsa_keymaster0_key.cpp
diff options
context:
space:
mode:
authorShawn Willden <swillden@google.com>2015-07-23 20:18:31 +0000
committerShawn Willden <swillden@google.com>2015-07-23 20:18:31 +0000
commit0e0cea3bc8aea903a50c1ee18e9f3309e9f67515 (patch)
treee45b4d16c9f9c23a459a21cb75f0e39445f32d72 /rsa_keymaster0_key.cpp
parent9972a539acb4d17368ee607465d61b48acd71bde (diff)
downloadandroid_system_keymaster-0e0cea3bc8aea903a50c1ee18e9f3309e9f67515.tar.gz
android_system_keymaster-0e0cea3bc8aea903a50c1ee18e9f3309e9f67515.tar.bz2
android_system_keymaster-0e0cea3bc8aea903a50c1ee18e9f3309e9f67515.zip
Revert "Report keymaster0 keys as hardware-backed, origin unknown."
This reverts commit 9972a539acb4d17368ee607465d61b48acd71bde. Change-Id: Id5beb9c8ae8f3b106adc5f5e62eca0194b926be8
Diffstat (limited to 'rsa_keymaster0_key.cpp')
-rw-r--r--rsa_keymaster0_key.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/rsa_keymaster0_key.cpp b/rsa_keymaster0_key.cpp
index 3afd024..f882f94 100644
--- a/rsa_keymaster0_key.cpp
+++ b/rsa_keymaster0_key.cpp
@@ -67,9 +67,8 @@ keymaster_error_t RsaKeymaster0KeyFactory::GenerateKey(const AuthorizationSet& k
hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA);
hw_enforced->push_back(TAG_RSA_PUBLIC_EXPONENT, public_exponent);
hw_enforced->push_back(TAG_KEY_SIZE, key_size);
- hw_enforced->push_back(TAG_ORIGIN, KM_ORIGIN_UNKNOWN);
- return context_->CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob,
+ return context_->CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob,
hw_enforced, sw_enforced);
}
@@ -102,9 +101,8 @@ keymaster_error_t RsaKeymaster0KeyFactory::ImportKey(
hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA);
hw_enforced->push_back(TAG_RSA_PUBLIC_EXPONENT, public_exponent);
hw_enforced->push_back(TAG_KEY_SIZE, key_size);
- hw_enforced->push_back(TAG_ORIGIN, KM_ORIGIN_UNKNOWN);
- return context_->CreateKeyBlob(authorizations, KM_ORIGIN_UNKNOWN, imported_hw_key,
+ return context_->CreateKeyBlob(authorizations, KM_ORIGIN_IMPORTED, imported_hw_key,
output_key_blob, hw_enforced, sw_enforced);
}