Lines Matching refs:key_blob
28 void set_key_blob(keymaster_key_blob_t* key_blob, const void* key_material, size_t length) { in set_key_blob() argument
29 delete[] key_blob->key_material; in set_key_blob()
30 key_blob->key_material = dup_buffer(key_material, length); in set_key_blob()
31 key_blob->key_material_size = length; in set_key_blob()
34 size_t key_blob_size(const keymaster_key_blob_t& key_blob) { in key_blob_size() argument
35 return sizeof(uint32_t) /* key size */ + key_blob.key_material_size; in key_blob_size()
38 uint8_t* serialize_key_blob(const keymaster_key_blob_t& key_blob, uint8_t* buf, in serialize_key_blob() argument
40 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in serialize_key_blob()
43 bool deserialize_key_blob(keymaster_key_blob_t* key_blob, const uint8_t** buf_ptr, in deserialize_key_blob() argument
45 delete[] key_blob->key_material; in deserialize_key_blob()
46 key_blob->key_material = nullptr; in deserialize_key_blob()
48 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
51 key_blob->key_material = deserialized_key_material.release(); in deserialize_key_blob()
208 key_blob_size(key_blob) + enforced.SerializedSize() + unenforced.SerializedSize(); in NonErrorSerializedSize()
214 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
222 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()
233 return key_blob_size(key_blob) + blob_size(maced_public_key); in NonErrorSerializedSize()
237 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
242 return deserialize_key_blob(&key_blob, buf_ptr, end) && in NonErrorDeserialize()
374 delete[] key_blob.key_material; in ~GetKeyCharacteristicsRequest()
378 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
382 return key_blob_size(key_blob) + additional_params.SerializedSize(); in SerializedSize()
386 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
391 return deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
410 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
414 return sizeof(uint32_t) /* purpose */ + key_blob_size(key_blob) + in SerializedSize()
420 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
426 deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
609 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
614 key_blob_size(key_blob) + enforced.SerializedSize() + unenforced.SerializedSize(); in NonErrorSerializedSize()
620 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
628 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()
639 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
644 key_blob_size(key_blob); in SerializedSize()
650 return serialize_key_blob(key_blob, buf, end); in Serialize()
656 deserialize_key_blob(&key_blob, buf_ptr, end); in Deserialize()
684 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
688 return key_blob_size(key_blob); in SerializedSize()
692 return serialize_key_blob(key_blob, buf, end); in Serialize()
696 return deserialize_key_blob(&key_blob, buf_ptr, end); in Deserialize()
725 delete[] key_blob.key_material; in ~AttestKeyRequest()
729 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
733 return key_blob_size(key_blob) + attest_params.SerializedSize(); in SerializedSize()
737 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
742 return deserialize_key_blob(&key_blob, buf_ptr, end) && attest_params.Deserialize(buf_ptr, end); in Deserialize()
759 delete[] key_blob.key_material; in ~UpgradeKeyRequest()
763 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
767 return key_blob_size(key_blob) + upgrade_params.SerializedSize(); in SerializedSize()
771 buf = serialize_key_blob(key_blob, buf, end); in Serialize()
776 return deserialize_key_blob(&key_blob, buf_ptr, end) && in Deserialize()
885 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial()
890 key_blob_size(key_blob) + enforced.SerializedSize() + unenforced.SerializedSize(); in NonErrorSerializedSize()
896 buf = serialize_key_blob(key_blob, buf, end); in NonErrorSerialize()
904 if (!deserialize_key_blob(&key_blob, buf_ptr, end) || // in NonErrorDeserialize()