diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-03 23:32:31 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-03 23:32:31 +0000 |
commit | b7560bcad944e3a043183e27ce63ec7457d623c2 (patch) | |
tree | 3bb6384fa060cb23d210483832a2c055064cf007 | |
parent | 1886fe2b5902a7aa5f14ce9724015d0bb1ba85ea (diff) | |
parent | 75fc9158c080a533edbf80416857954dbf48ab8b (diff) | |
download | security-b7560bcad944e3a043183e27ce63ec7457d623c2.tar.gz |
Snap for 9133013 from 75fc9158c080a533edbf80416857954dbf48ab8b to tm-qpr2-release
Change-Id: I609fc1bf0c04841b593499d423ab0c30320f60f6
-rw-r--r-- | keystore2/src/km_compat/km_compat.cpp | 11 | ||||
-rw-r--r-- | prng_seeder/OWNERS | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/keystore2/src/km_compat/km_compat.cpp b/keystore2/src/km_compat/km_compat.cpp index 6d0630b4..d513db0d 100644 --- a/keystore2/src/km_compat/km_compat.cpp +++ b/keystore2/src/km_compat/km_compat.cpp @@ -574,6 +574,17 @@ ScopedAStatus KeyMintDevice::upgradeKey(const std::vector<uint8_t>& in_inKeyBlob auto legacyUpgradeParams = convertKeyParametersToLegacy(in_inUpgradeParams); V4_0_ErrorCode errorCode; + if (prefixedKeyBlobIsSoftKeyMint(in_inKeyBlobToUpgrade)) { + auto status = softKeyMintDevice_->upgradeKey( + prefixedKeyBlobRemovePrefix(in_inKeyBlobToUpgrade), in_inUpgradeParams, _aidl_return); + if (!status.isOk()) { + LOG(ERROR) << __func__ << " transaction failed. " << status.getDescription(); + } else { + *_aidl_return = keyBlobPrefix(*_aidl_return, true); + } + return status; + } + auto result = mDevice->upgradeKey(prefixedKeyBlobRemovePrefix(in_inKeyBlobToUpgrade), legacyUpgradeParams, [&](V4_0_ErrorCode error, const hidl_vec<uint8_t>& upgradedKeyBlob) { diff --git a/prng_seeder/OWNERS b/prng_seeder/OWNERS new file mode 100644 index 00000000..9202b90e --- /dev/null +++ b/prng_seeder/OWNERS @@ -0,0 +1,2 @@ +paulcrowley@google.com +prb@google.com
\ No newline at end of file |