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.cpp43 bool deserialize_key_blob(keymaster_key_blob_t* key_blob, const uint8_t** buf_ptr, in deserialize_key_blob() argument
48 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
71 bool deserialize_blob(keymaster_blob_t* blob, const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_blob() argument
75 if (!copy_size_and_data_from_buf(buf_ptr, end, &blob->data_length, &deserialized_blob)) in deserialize_blob()
105 CertificateChain deserialize_chain(const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_chain() argument
107 if (!copy_uint32_from_buf(buf_ptr, end, &entry_count) || entry_count > kMaxChainEntryCount) { in deserialize_chain()
117 if (!copy_size_and_data_from_buf(buf_ptr, end, &data_length, &data)) return {}; in deserialize_chain()
175 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
176 if (!copy_uint32_from_buf(buf_ptr, end, &error)) return false; in Deserialize()
178 return NonErrorDeserialize(buf_ptr, end); in Deserialize()
[all …]
Dserializable.cpp45 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
46 if (buffer_bound_check(*buf_ptr, end, size)) { in copy_from_buf()
47 memcpy(dest, *buf_ptr, size); in copy_from_buf()
48 *buf_ptr += size; in copy_from_buf()
55 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
57 if (!copy_uint32_from_buf(buf_ptr, end, size)) return false; in copy_size_and_data_from_buf()
64 if (buffer_bound_check(*buf_ptr, end, *size)) { in copy_size_and_data_from_buf()
69 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
146 bool Buffer::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
148 if (!copy_size_and_data_from_buf(buf_ptr, end, &buffer_size_, &buffer_)) { in Deserialize()
Dauthorization_set.cpp349 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, in deserialize() argument
351 if (!copy_uint32_from_buf(buf_ptr, end, &param->tag)) return false; in deserialize()
358 return copy_uint32_from_buf(buf_ptr, end, &param->enumerated); in deserialize()
361 return copy_uint32_from_buf(buf_ptr, end, &param->integer); in deserialize()
364 return copy_uint64_from_buf(buf_ptr, end, &param->long_integer); in deserialize()
366 return copy_uint64_from_buf(buf_ptr, end, &param->date_time); in deserialize()
369 if (*buf_ptr < end) { in deserialize()
370 uint8_t temp = **buf_ptr; in deserialize()
375 (*buf_ptr)++; in deserialize()
384 if (!copy_uint32_from_buf(buf_ptr, end, &param->blob.data_length) || in deserialize()
[all …]
/system/bt/osi/test/fuzzers/fixed_queue/
Dfuzz_fixed_queue.cc77 void* buf_ptr = nullptr; in callArbitraryFunction() local
107 buf_ptr = generateBuffer(dataProvider, MAX_BUF_SIZE, false); in callArbitraryFunction()
108 live_buffer_vector->push_back(buf_ptr); in callArbitraryFunction()
109 if (buf_ptr) { in callArbitraryFunction()
113 fixed_queue_enqueue(fixed_queue, buf_ptr); in callArbitraryFunction()
120 buf_ptr = generateBuffer(dataProvider, MAX_BUF_SIZE, false); in callArbitraryFunction()
121 live_buffer_vector->push_back(buf_ptr); in callArbitraryFunction()
122 if (buf_ptr) { in callArbitraryFunction()
123 fixed_queue_try_enqueue(fixed_queue, buf_ptr); in callArbitraryFunction()
153 buf_ptr = live_buffer_vector->at(index); in callArbitraryFunction()
[all …]
/system/keymaster/include/keymaster/
Dandroid_keymaster_messages.h169 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
173 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
215 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
216 return copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
241 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
242 return copy_uint32_from_buf(buf_ptr, end, &algorithm) && in Deserialize()
243 copy_uint32_from_buf(buf_ptr, end, &purpose); in Deserialize()
292 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in NonErrorDeserialize()
296 if (!copy_uint32_array_from_buf(buf_ptr, end, &tmp, &results_length)) return false; in NonErrorDeserialize()
345 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
[all …]
Dserializable.h50 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
140 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size);
149 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size,
157 inline bool copy_uint32_from_buf(const uint8_t** buf_ptr, const uint8_t* end, T* value) { in copy_uint32_from_buf() argument
159 if (!copy_from_buf(buf_ptr, end, &val, sizeof(val))) return false; in copy_uint32_from_buf()
168 inline bool copy_uint64_from_buf(const uint8_t** buf_ptr, const uint8_t* end, uint64_t* value) { in copy_uint64_from_buf() argument
169 return copy_from_buf(buf_ptr, end, value, sizeof(*value)); in copy_uint64_from_buf()
179 inline bool copy_uint32_array_from_buf(const uint8_t** buf_ptr, const uint8_t* end, in copy_uint32_array_from_buf() argument
181 if (!copy_uint32_from_buf(buf_ptr, end, count)) return false; in copy_uint32_array_from_buf()
183 uintptr_t array_end = __pval(*buf_ptr) + *count * sizeof(uint32_t); in copy_uint32_array_from_buf()
[all …]
Dandroid_keymaster_utils.h217 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize()
220 if (!copy_size_and_data_from_buf(buf_ptr, end, &accessBlobSize(this), &tmp)) { in Deserialize()
Dauthorization_set.h442 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end);
456 bool DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end);
457 bool DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end);
/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/keymaster/key_blob_utils/
Dauth_encrypted_key_blob.cpp248 const uint8_t** buf_ptr = &tmp; in DeserializeAuthEncryptedBlob() local
251 if (end <= *buf_ptr) { in DeserializeAuthEncryptedBlob()
257 retval.encrypted_key.format = static_cast<AuthEncryptedBlobFormat>(*(*buf_ptr)++); in DeserializeAuthEncryptedBlob()
258 if (!retval.encrypted_key.nonce.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
259 !retval.encrypted_key.ciphertext.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
260 !retval.encrypted_key.tag.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
261 !retval.hw_enforced.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
262 !retval.sw_enforced.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
263 *buf_ptr != end) { in DeserializeAuthEncryptedBlob()
/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/bt/stack/hcic/
Dhciblecmds.cc1039 uint8_t* buf_ptr = bcst_code.data(); in btsnd_hcic_create_big() local
1040 ARRAY_TO_STREAM(pp, buf_ptr, 16); in btsnd_hcic_create_big()
1081 uint8_t* buf_ptr = bcst_code.data(); in btsnd_hcic_big_create_sync() local
1082 ARRAY_TO_STREAM(pp, buf_ptr, 16); in btsnd_hcic_big_create_sync()