Fix disagreement of client_id/app_data pointer semantic
KM1/KM2 implementations should treat nullptr and KeymasterBlob{nullptr, 0}
equally when passed in as client_id or app_data. However, trusty KM1
treats them differently.
Bug: 113110105
Bug: 113084196
Change-Id: Ie0e2b5d60d808e4f7a8e48aeb4c694268f9bc0a1
This commit is contained in:
parent
ca10a6ffd3
commit
56c533dfd9
1 changed files with 2 additions and 2 deletions
|
|
@ -122,10 +122,10 @@ template <typename RequestType>
|
|||
void AddClientAndAppData(const keymaster_blob_t* client_id, const keymaster_blob_t* app_data,
|
||||
RequestType* request) {
|
||||
request->additional_params.Clear();
|
||||
if (client_id) {
|
||||
if (client_id && client_id->data_length > 0) {
|
||||
request->additional_params.push_back(TAG_APPLICATION_ID, *client_id);
|
||||
}
|
||||
if (app_data) {
|
||||
if (app_data && app_data->data_length > 0) {
|
||||
request->additional_params.push_back(TAG_APPLICATION_DATA, *app_data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue