Skip to content

Commit

Permalink
Added debug and error logs in hal apis.
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamagoud committed May 5, 2021
1 parent 8cef2bf commit 6d8edc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HAL/keymaster/4.1/JavacardKeymaster4Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ Return<void> JavacardKeymaster4Device::importKey(const hidl_vec<KeyParameter>& k
cppbor::Array subArray;

if(keyFormat != KeyFormat::PKCS8 && keyFormat != KeyFormat::RAW) {
LOG(DEBUG) << "INS_IMPORT_KEY_CMD unsupported key format " << (int32_t)keyFormat;
LOG(ERROR) << "INS_IMPORT_KEY_CMD unsupported key format " << (int32_t)keyFormat;
_hidl_cb(ErrorCode::UNSUPPORTED_KEY_FORMAT, keyBlob, keyCharacteristics);
return Void();
}
Expand Down Expand Up @@ -1130,7 +1130,7 @@ Return<void> JavacardKeymaster4Device::begin(KeyPurpose purpose, const hidl_vec<
}
}
} else {
LOG(ERROR) << "INS_BEGIN_OPERATION_CMD couldn't find tag: " << (int32_t)Tag::ALGORITHM;
LOG(ERROR) << "INS_BEGIN_OPERATION_CMD couldn't find algorithm tag: " << (int32_t)Tag::ALGORITHM;
}
} else {
LOG(ERROR) << "INS_BEGIN_OPERATION_CMD error in getKeyCharacteristics status: " << (int32_t) errorCode;
Expand Down

0 comments on commit 6d8edc6

Please sign in to comment.