Home
last modified time | relevance | path

Searched refs:buf_ptr (Results 1 – 12 of 12) sorted by relevance

/system/keymaster/android_keymaster/
Dandroid_keymaster_messages.cpp46 bool deserialize_key_blob(keymaster_key_blob_t* key_blob, const uint8_t** buf_ptr, in deserialize_key_blob() argument
51 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
74 bool deserialize_blob(keymaster_blob_t* blob, const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_blob() argument
78 if (!copy_size_and_data_from_buf(buf_ptr, end, &blob->data_length, &deserialized_blob)) in deserialize_blob()
108 CertificateChain deserialize_chain(const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_chain() argument
110 if (!copy_uint32_from_buf(buf_ptr, end, &entry_count) || entry_count > kMaxChainEntryCount) { in deserialize_chain()
120 if (!copy_size_and_data_from_buf(buf_ptr, end, &data_length, &data)) return {}; in deserialize_chain()
178 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
179 if (!copy_uint32_from_buf(buf_ptr, end, &error)) return false; in Deserialize()
181 return NonErrorDeserialize(buf_ptr, end); in Deserialize()
[all …]
Dserializable.cpp40 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
41 if (__buffer_bound_check(*buf_ptr, end, size)) { in copy_from_buf()
42 memcpy(dest, *buf_ptr, size); in copy_from_buf()
43 *buf_ptr += size; in copy_from_buf()
50 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, in copy_size_and_data_from_buf() argument
52 if (!copy_uint32_from_buf(buf_ptr, end, size)) return false; in copy_size_and_data_from_buf()
59 if (__buffer_bound_check(*buf_ptr, end, *size)) { in copy_size_and_data_from_buf()
64 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
167 bool Buffer::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
169 if (!copy_size_and_data_from_buf(buf_ptr, end, &buffer_size_, &buffer_)) { in Deserialize()
Dauthorization_set.cpp342 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, in deserialize() argument
344 if (!copy_uint32_from_buf(buf_ptr, end, &param->tag)) return false; in deserialize()
351 return copy_uint32_from_buf(buf_ptr, end, &param->enumerated); in deserialize()
354 return copy_uint32_from_buf(buf_ptr, end, &param->integer); in deserialize()
357 return copy_uint64_from_buf(buf_ptr, end, &param->long_integer); in deserialize()
359 return copy_uint64_from_buf(buf_ptr, end, &param->date_time); in deserialize()
362 if (*buf_ptr < end) { in deserialize()
363 uint8_t temp = **buf_ptr; in deserialize()
368 (*buf_ptr)++; in deserialize()
377 if (!copy_uint32_from_buf(buf_ptr, end, &param->blob.data_length) || in deserialize()
[all …]
/system/keymaster/include/keymaster/
Dserializable.h54 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
164 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size);
173 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size,
181 inline bool copy_uint32_from_buf(const uint8_t** buf_ptr, const uint8_t* end, T* value) { in copy_uint32_from_buf() argument
183 if (!copy_from_buf(buf_ptr, end, &val, sizeof(val))) return false; in copy_uint32_from_buf()
192 inline bool copy_uint64_from_buf(const uint8_t** buf_ptr, const uint8_t* end, uint64_t* value) { in copy_uint64_from_buf() argument
193 return copy_from_buf(buf_ptr, end, value, sizeof(*value)); in copy_uint64_from_buf()
203 inline bool copy_uint32_array_from_buf(const uint8_t** buf_ptr, const uint8_t* end, in copy_uint32_array_from_buf() argument
205 if (!copy_uint32_from_buf(buf_ptr, end, count)) return false; in copy_uint32_array_from_buf()
207 uintptr_t array_end = __pval(*buf_ptr) + *count * sizeof(uint32_t); in copy_uint32_array_from_buf()
[all …]
Dandroid_keymaster_messages.h182 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
186 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
228 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
229 return copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
254 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
255 return copy_uint32_from_buf(buf_ptr, end, &algorithm) && in Deserialize()
256 copy_uint32_from_buf(buf_ptr, end, &purpose); in Deserialize()
305 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in NonErrorDeserialize()
309 if (!copy_uint32_array_from_buf(buf_ptr, end, &tmp, &results_length)) return false; in NonErrorDeserialize()
358 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
[all …]
Dandroid_keymaster_utils.h219 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize()
222 if (!copy_size_and_data_from_buf(buf_ptr, end, &accessBlobSize(this), &tmp)) { in Deserialize()
Dauthorization_set.h438 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end);
452 bool DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end);
453 bool DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end);
/system/keymaster/key_blob_utils/
Dauth_encrypted_key_blob.cpp246 const uint8_t** buf_ptr = &tmp; in DeserializeAuthEncryptedBlob() local
249 if (end <= *buf_ptr) return KM_ERROR_INVALID_KEY_BLOB; in DeserializeAuthEncryptedBlob()
252 retval.encrypted_key.format = static_cast<AuthEncryptedBlobFormat>(*(*buf_ptr)++); in DeserializeAuthEncryptedBlob()
253 if (!retval.encrypted_key.nonce.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
254 !retval.encrypted_key.ciphertext.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
255 !retval.encrypted_key.tag.Deserialize(buf_ptr, end)) { in DeserializeAuthEncryptedBlob()
260 if (!copy_uint32_from_buf(buf_ptr, end, &retval.encrypted_key.kdf_version) || in DeserializeAuthEncryptedBlob()
261 !copy_uint32_from_buf(buf_ptr, end, &retval.encrypted_key.addl_info)) { in DeserializeAuthEncryptedBlob()
266 if (!retval.hw_enforced.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
267 !retval.sw_enforced.Deserialize(buf_ptr, end)) { in DeserializeAuthEncryptedBlob()
[all …]
/system/chre/apps/wifi_offload/
Dutility.cc101 char *buf_ptr = ssid_buffer; in LogSsid() local
103 buf_ptr += std::sprintf(buf_ptr, "%02" PRIx8 ":", ssid[i]); in LogSsid()
105 buf_ptr[-1] = '\0'; in LogSsid()
/system/core/trusty/keymaster/set_attestation_key/
Dset_attestation_key.cpp81 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
82 return keymaster::copy_uint32_from_buf(buf_ptr, end, &algorithm) && in Deserialize()
83 key_data.Deserialize(buf_ptr, end); in Deserialize()
109 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
110 return keymaster::copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
/system/security/fsverity/libfsverity_rs/
Dsys.rs34 pub buf_ptr: u64, field
Dlib.rs31 buf_ptr: buf.as_mut_ptr() as u64, in read_metadata()