diff --git a/Applet/AndroidSEProvider/lib/gpapi-upgrade.jar b/Applet/AndroidSEProvider/lib/gpapi-upgrade.jar deleted file mode 100644 index e4814bde..00000000 Binary files a/Applet/AndroidSEProvider/lib/gpapi-upgrade.jar and /dev/null differ diff --git a/Applet/JCardSimProvider/lib/gpapi-upgrade.jar b/Applet/JCardSimProvider/lib/gpapi-upgrade.jar deleted file mode 100644 index e4814bde..00000000 Binary files a/Applet/JCardSimProvider/lib/gpapi-upgrade.jar and /dev/null differ diff --git a/Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java b/Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java index f549a30d..f31ad12b 100644 --- a/Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java +++ b/Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java @@ -1516,7 +1516,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; } diff --git a/HAL/keymaster/4.1/JavacardKeymaster4Device.cpp b/HAL/keymaster/4.1/JavacardKeymaster4Device.cpp index 9df7b6d4..17e5bb4c 100644 --- a/HAL/keymaster/4.1/JavacardKeymaster4Device.cpp +++ b/HAL/keymaster/4.1/JavacardKeymaster4Device.cpp @@ -177,7 +177,7 @@ static void clearStrongboxOprHandleEntries(const std::unique_ptrsecond == 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); @@ -968,8 +968,7 @@ Return 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); diff --git a/ProvisioningTool/README.md b/ProvisioningTool/README.md index e7eaef20..35cbca19 100644 --- a/ProvisioningTool/README.md +++ b/ProvisioningTool/README.md @@ -28,7 +28,7 @@ paths mentioned in the sample json file. Usage: construct_apdus options Valid options are: -h, --help show the help message and exit. --v, --km_version version Version of the keymaster (4.1 for keymaster; 5.0 for keymint) +-v, --km_version version Version of the keymaster ((4.0 or 4.1 for respective keymaster version)) -i, --input jsonFile Input json file -o, --output jsonFile Output json file @@ -38,7 +38,7 @@ Valid options are: Usage: provision options Valid options are: -h, --help show the help message and exit. --v, --km_version version Version of the keymaster (4.1 for keymaster; 5.0 for keymint) +-v, --km_version version Version of the keymaster ((4.0 or 4.1 for respective keymaster version)) -i, --input jsonFile Input json file -s, --provision_stautus Prints the current provision status. -l, --lock_provision Locks the provision state.