Lines Matching refs:key_blob
741 keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t** characteristics) { in generate_key() argument
745 if (!key_blob) in generate_key()
755 return km1_dev->generate_key(km1_dev, params, key_blob, characteristics); in generate_key()
762 key_blob->key_material_size = response.key_blob.key_material_size; in generate_key()
763 uint8_t* tmp = reinterpret_cast<uint8_t*>(malloc(key_blob->key_material_size)); in generate_key()
766 memcpy(tmp, response.key_blob.key_material, response.key_blob.key_material_size); in generate_key()
767 key_blob->key_material = tmp; in generate_key()
787 keymaster_key_blob_t* key_blob, in generate_key() argument
795 if (!key_blob) in generate_key()
826 keymaster_error_t error = km1_dev->generate_key(km1_dev, &request.key_description, key_blob, in generate_key()
844 key_blob->key_material_size = response.key_blob.key_material_size; in generate_key()
845 uint8_t* tmp = reinterpret_cast<uint8_t*>(malloc(key_blob->key_material_size)); in generate_key()
848 memcpy(tmp, response.key_blob.key_material, response.key_blob.key_material_size); in generate_key()
849 key_blob->key_material = tmp; in generate_key()
861 const keymaster1_device_t* dev, const keymaster_key_blob_t* key_blob, in get_key_characteristics() argument
864 if (!dev || !key_blob || !key_blob->key_material) in get_key_characteristics()
872 keymaster_error_t error = km1_dev->get_key_characteristics(km1_dev, key_blob, client_id, in get_key_characteristics()
882 request.SetKeyMaterial(*key_blob); in get_key_characteristics()
905 const keymaster2_device_t* dev, const keymaster_key_blob_t* key_blob, in get_key_characteristics() argument
920 request.SetKeyMaterial(*key_blob); in get_key_characteristics()
938 keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t** characteristics) { in import_key() argument
942 if (!key_blob) in import_key()
952 return km1_dev->import_key(km1_dev, params, key_format, key_data, key_blob, in import_key()
966 key_blob->key_material_size = response.key_blob.key_material_size; in import_key()
967 key_blob->key_material = reinterpret_cast<uint8_t*>(malloc(key_blob->key_material_size)); in import_key()
968 if (!key_blob->key_material) in import_key()
970 memcpy(const_cast<uint8_t*>(key_blob->key_material), response.key_blob.key_material, in import_key()
971 response.key_blob.key_material_size); in import_key()
985 keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t* characteristics) { in import_key() argument
997 error = import_key(&sk_dev->km1_device_, params, key_format, key_data, key_blob, in import_key()
1004 error = import_key(&sk_dev->km1_device_, params, key_format, key_data, key_blob, nullptr); in import_key()