Lines Matching full:deserialized
43 Message* deserialized = new Message(ver);
45 EXPECT_TRUE(deserialized->Deserialize(&p, p + size));
47 return deserialized;
71 UniquePtr<EmptyKeymasterResponse> deserialized(round_trip(ver, msg, 5));
80 UniquePtr<EmptyKeymasterResponse> deserialized(round_trip(ver, msg, 4));
89 UniquePtr<SupportedByAlgorithmRequest> deserialized(round_trip(ver, req, 4));
90 EXPECT_EQ(KM_ALGORITHM_EC, deserialized->algorithm);
100 UniquePtr<SupportedByAlgorithmAndPurposeRequest> deserialized(round_trip(ver, req, 8));
101 EXPECT_EQ(KM_ALGORITHM_EC, deserialized->algorithm);
102 EXPECT_EQ(KM_PURPOSE_DECRYPT, deserialized->purpose);
113 UniquePtr<SupportedResponse<keymaster_digest_t>> deserialized(round_trip(ver, rsp, 20));
114 EXPECT_EQ(array_length(digests), deserialized->results_length);
115 EXPECT_EQ(0, memcmp(deserialized->results, digests, array_size(digests)));
134 UniquePtr<GenerateKeyRequest> deserialized(round_trip(ver, req, 78));
135 EXPECT_EQ(deserialized->key_description, req.key_description);
147 UniquePtr<GenerateKeyResponse> deserialized(round_trip(ver, rsp, 109));
148 EXPECT_EQ(KM_ERROR_OK, deserialized->error);
149 EXPECT_EQ(deserialized->enforced, rsp.enforced);
150 EXPECT_EQ(deserialized->unenforced, rsp.unenforced);
162 UniquePtr<GenerateKeyResponse> deserialized(round_trip(ver, rsp, 4));
163 EXPECT_EQ(KM_ERROR_UNSUPPORTED_ALGORITHM, deserialized->error);
164 EXPECT_EQ(0U, deserialized->enforced.size());
165 EXPECT_EQ(0U, deserialized->unenforced.size());
166 EXPECT_EQ(0U, deserialized->key_blob.key_material_size);
176 UniquePtr<GetKeyCharacteristicsRequest> deserialized(round_trip(ver, req, 85));
177 EXPECT_EQ(7U, deserialized->additional_params.size());
178 EXPECT_EQ(3U, deserialized->key_blob.key_material_size);
179 EXPECT_EQ(0, memcmp(deserialized->key_blob.key_material, "foo", 3));
190 UniquePtr<GetKeyCharacteristicsResponse> deserialized(round_trip(ver, msg, 160));
191 EXPECT_EQ(msg.enforced, deserialized->enforced);
192 EXPECT_EQ(msg.unenforced, deserialized->unenforced);
203 UniquePtr<BeginOperationRequest> deserialized(round_trip(ver, msg, 89));
204 EXPECT_EQ(KM_PURPOSE_SIGN, deserialized->purpose);
205 EXPECT_EQ(3U, deserialized->key_blob.key_material_size);
206 EXPECT_EQ(0, memcmp(deserialized->key_blob.key_material, "foo", 3));
207 EXPECT_EQ(msg.additional_params, deserialized->additional_params);
218 UniquePtr<BeginOperationResponse> deserialized;
221 deserialized.reset(round_trip(ver, msg, 12));
225 deserialized.reset(round_trip(ver, msg, 39));
231 EXPECT_EQ(KM_ERROR_OK, deserialized->error);
232 EXPECT_EQ(0xDEADBEEF, deserialized->op_handle);
236 EXPECT_EQ(0U, deserialized->output_params.size());
240 EXPECT_EQ(msg.output_params, deserialized->output_params);
254 UniquePtr<BeginOperationResponse> deserialized(round_trip(ver, msg, 4));
255 EXPECT_EQ(KM_ERROR_INVALID_OPERATION_HANDLE, deserialized->error);
265 UniquePtr<UpdateOperationRequest> deserialized;
268 deserialized.reset(round_trip(ver, msg, 15));
272 deserialized.reset(round_trip(ver, msg, 27));
277 EXPECT_EQ(3U, deserialized->input.available_read());
278 EXPECT_EQ(0, memcmp(deserialized->input.peek_read(), "foo", 3));
290 UniquePtr<UpdateOperationResponse> deserialized;
293 deserialized.reset(round_trip(ver, msg, 11));
296 deserialized.reset(round_trip(ver, msg, 15));
299 deserialized.reset(round_trip(ver, msg, 42));
304 EXPECT_EQ(KM_ERROR_OK, deserialized->error);
305 EXPECT_EQ(3U, deserialized->output.available_read());
306 EXPECT_EQ(0, memcmp(deserialized->output.peek_read(), "foo", 3));
310 EXPECT_EQ(0U, deserialized->input_consumed);
313 EXPECT_EQ(99U, deserialized->input_consumed);
316 EXPECT_EQ(99U, deserialized->input_consumed);
317 EXPECT_EQ(1U, deserialized->output_params.size());
331 UniquePtr<FinishOperationRequest> deserialized;
334 deserialized.reset(round_trip(ver, msg, 15));
338 deserialized.reset(round_trip(ver, msg, 27));
343 EXPECT_EQ(0xDEADBEEF, deserialized->op_handle);
344 EXPECT_EQ(3U, deserialized->signature.available_read());
345 EXPECT_EQ(0, memcmp(deserialized->signature.peek_read(), "bar", 3));
355 UniquePtr<FinishOperationResponse> deserialized;
359 deserialized.reset(round_trip(ver, msg, 11));
362 deserialized.reset(round_trip(ver, msg, 23));
367 EXPECT_EQ(msg.error, deserialized->error);
368 EXPECT_EQ(msg.output.available_read(), deserialized->output.available_read());
369 EXPECT_EQ(0, memcmp(msg.output.peek_read(), deserialized->output.peek_read(),
381 UniquePtr<ImportKeyRequest> deserialized(round_trip(ver, msg, 89));
382 EXPECT_EQ(msg.key_description, deserialized->key_description);
383 EXPECT_EQ(msg.key_format, deserialized->key_format);
384 EXPECT_EQ(msg.key_data_length, deserialized->key_data_length);
385 EXPECT_EQ(0, memcmp(msg.key_data, deserialized->key_data, msg.key_data_length));
397 UniquePtr<ImportKeyResponse> deserialized(round_trip(ver, msg, 167));
398 EXPECT_EQ(msg.error, deserialized->error);
399 EXPECT_EQ(msg.key_blob.key_material_size, deserialized->key_blob.key_material_size);
400 EXPECT_EQ(0, memcmp(msg.key_blob.key_material, deserialized->key_blob.key_material,
402 EXPECT_EQ(msg.enforced, deserialized->enforced);
403 EXPECT_EQ(msg.unenforced, deserialized->unenforced);
414 UniquePtr<ExportKeyRequest> deserialized(round_trip(ver, msg, 89));
415 EXPECT_EQ(msg.additional_params, deserialized->additional_params);
416 EXPECT_EQ(msg.key_format, deserialized->key_format);
417 EXPECT_EQ(3U, deserialized->key_blob.key_material_size);
418 EXPECT_EQ(0, memcmp("foo", deserialized->key_blob.key_material, 3));
428 UniquePtr<ExportKeyResponse> deserialized(round_trip(ver, msg, 11));
429 EXPECT_EQ(3U, deserialized->key_data_length);
430 EXPECT_EQ(0, memcmp("foo", deserialized->key_data, 3));
439 UniquePtr<DeleteKeyRequest> deserialized(round_trip(ver, msg, 7));
440 EXPECT_EQ(3U, deserialized->key_blob.key_material_size);
441 EXPECT_EQ(0, memcmp("foo", deserialized->key_blob.key_material, 3));
448 UniquePtr<DeleteKeyResponse> deserialized(round_trip(ver, msg, 4));
455 UniquePtr<DeleteAllKeysRequest> deserialized(round_trip(ver, msg, 0));
462 UniquePtr<DeleteAllKeysResponse> deserialized(round_trip(ver, msg, 4));
475 GetVersionRequest deserialized;
477 EXPECT_TRUE(deserialized.Deserialize(&p, p + size));
494 GetVersionResponse deserialized;
496 EXPECT_TRUE(deserialized.Deserialize(&p, p + size));
508 UniquePtr<AddEntropyRequest> deserialized(round_trip(ver, msg, 7));
509 EXPECT_EQ(3U, deserialized->random_data.available_read());
510 EXPECT_EQ(0, memcmp("foo", deserialized->random_data.peek_read(), 3));
517 UniquePtr<AddEntropyResponse> deserialized(round_trip(ver, msg, 4));
524 UniquePtr<AbortOperationRequest> deserialized(round_trip(ver, msg, 8));
531 UniquePtr<AbortOperationResponse> deserialized(round_trip(ver, msg, 4));