summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaiping Yang <haiping@google.com>2021-08-23 01:24:25 +0000
committerJosh Yang <yzj@google.com>2021-08-30 21:04:59 +0000
commitc0a46c81064dd9a632e446c4987145db61874b44 (patch)
treeab7ce0cea7df54eec1f789dae6c6d86fd2f57289
parenteae11551bdcd1ee68402a389fce62790ddf840e8 (diff)
downloadvold-android12-qpr1-d-s3-release.tar.gz
This reverts commit 2601eb7f8c241f9cf24510115e0a572819fd0514. Ignore-AOSP-First: reverted change was introduced in sc-dev Bug: 196887752 Test: R11 boots on master Reason for revert: R11 boot failure on master Change-Id: I8d2f566f3991f30cd65c48d959d26df8b6c85f32
-rw-r--r--KeyStorage.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/KeyStorage.cpp b/KeyStorage.cpp
index 93c5c29c..472e6b1e 100644
--- a/KeyStorage.cpp
+++ b/KeyStorage.cpp
@@ -379,9 +379,7 @@ static bool encryptWithKeymasterKey(Keymaster& keymaster, const std::string& dir
const km::AuthorizationSet& keyParams,
const KeyBuffer& message, std::string* ciphertext) {
km::AuthorizationSet opParams =
- km::AuthorizationSetBuilder()
- .Authorization(km::TAG_ROLLBACK_RESISTANCE)
- .Authorization(km::TAG_PURPOSE, km::KeyPurpose::ENCRYPT);
+ km::AuthorizationSetBuilder().Authorization(km::TAG_PURPOSE, km::KeyPurpose::ENCRYPT);
km::AuthorizationSet outParams;
auto opHandle = BeginKeymasterOp(keymaster, dir, keyParams, opParams, &outParams);
if (!opHandle) return false;
@@ -410,7 +408,6 @@ static bool decryptWithKeymasterKey(Keymaster& keymaster, const std::string& dir
auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES);
auto opParams = km::AuthorizationSetBuilder()
.Authorization(km::TAG_NONCE, nonce)
- .Authorization(km::TAG_ROLLBACK_RESISTANCE)
.Authorization(km::TAG_PURPOSE, km::KeyPurpose::DECRYPT);
auto opHandle = BeginKeymasterOp(keymaster, dir, keyParams, opParams, nullptr);
if (!opHandle) return false;