Skip to content

Commit

Permalink
Merge pull request #78 from subrahmanyaman/Javacard_KM_40_AOSP_UPMERG…
Browse files Browse the repository at this point in the history
…E_0630

Keymaster40 Update
  • Loading branch information
mdwivedi authored Dec 8, 2021
2 parents f730206 + c36eb5f commit d19e5db
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Binary file removed Applet/AndroidSEProvider/lib/gpapi-upgrade.jar
Binary file not shown.
Binary file removed Applet/JCardSimProvider/lib/gpapi-upgrade.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ private boolean isEmpty(byte[] buf, short offset, short len) {
boolean empty = true;
short index = 0;
while (index < len) {
if (buf[index] != 0) {
if (buf[(short) (index + offset)] != 0) {
empty = false;
break;
}
Expand Down
5 changes: 2 additions & 3 deletions HAL/keymaster/4.0/JavacardKeymaster4Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void clearStrongboxOprHandleEntries(const std::unique_ptr<OperationContex
<< "Secure Element reset or applet upgrade detected. Removing existing operation handles";
auto it = operationTable.begin();
while (it != operationTable.end()) {
if (it->second == OperationType::PRIVATE_OPERATION) { // Strongbox operation
if (it->second == OperationType::PRIVATE_OPERATION) { // Strongbox operation
LOG(INFO) << "operation handle: " << it->first << " is removed";
oprCtx->clearOperationData(it->first);
it = operationTable.erase(it);
Expand Down Expand Up @@ -949,8 +949,7 @@ Return<void> JavacardKeymaster4Device::begin(KeyPurpose purpose, const hidl_vec<
errorCode = handleBeginOperation(purpose, keyBlob, inParams, authToken, outParams,
operationHandle, operType);
if (errorCode == ErrorCode::OK && isOperationHandleExists(operationHandle)) {
LOG(DEBUG) << "Operation handle " << operationHandle
<< "already exists"
LOG(DEBUG) << "Operation handle " << operationHandle << "already exists"
"in the opertion table. so aborting this opertaion.";
// abort the operation.
errorCode = abortOperation(operationHandle, operType);
Expand Down

0 comments on commit d19e5db

Please sign in to comment.