Decrypt super-encrypted keys
This fixes a bug introduce in ag/2108644. That CL added automatic
super-encryption of authentication-bound keys, but missed the necessary
change to decrypt them when needed.
Test: Manually tested
Change-Id: I84693b145a6d57d5957aa40d10236e1a0610d12c
diff --git a/keystore/blob.cpp b/keystore/blob.cpp
index 0e09262..e173b68 100644
--- a/keystore/blob.cpp
+++ b/keystore/blob.cpp
@@ -191,7 +191,7 @@
}
ssize_t digestedLength;
- if (isEncrypted()) {
+ if (isEncrypted() || isSuperEncrypted()) {
if (encryptedLength % AES_BLOCK_SIZE != 0) {
return ResponseCode::VALUE_CORRUPTED;
}