Lines Matching refs:database_pb
217 auto database_pb = database_->GetProtobuf(); in GetEndorsementInfoTask() local
218 if (!database_pb.has_credentials() || in GetEndorsementInfoTask()
219 !database_pb.credentials().has_endorsement_public_key()) { in GetEndorsementInfoTask()
226 database_pb.mutable_credentials()->set_endorsement_public_key(public_key); in GetEndorsementInfoTask()
231 database_pb.credentials().endorsement_public_key(), in GetEndorsementInfoTask()
238 if (database_pb.credentials().has_endorsement_credential()) { in GetEndorsementInfoTask()
240 database_pb.credentials().endorsement_credential()); in GetEndorsementInfoTask()
264 auto database_pb = database_->GetProtobuf(); in GetAttestationKeyInfoTask() local
265 if (!IsPreparedForEnrollment() || !database_pb.has_identity_key()) { in GetAttestationKeyInfoTask()
269 if (database_pb.identity_key().has_identity_public_key()) { in GetAttestationKeyInfoTask()
273 database_pb.identity_key().identity_public_key(), in GetAttestationKeyInfoTask()
281 if (database_pb.has_identity_binding() && in GetAttestationKeyInfoTask()
282 database_pb.identity_binding().has_identity_public_key()) { in GetAttestationKeyInfoTask()
284 database_pb.identity_binding().identity_public_key()); in GetAttestationKeyInfoTask()
286 if (database_pb.identity_key().has_identity_credential()) { in GetAttestationKeyInfoTask()
287 result->set_certificate(database_pb.identity_key().identity_credential()); in GetAttestationKeyInfoTask()
289 if (database_pb.has_pcr0_quote()) { in GetAttestationKeyInfoTask()
290 *result->mutable_pcr0_quote() = database_pb.pcr0_quote(); in GetAttestationKeyInfoTask()
292 if (database_pb.has_pcr1_quote()) { in GetAttestationKeyInfoTask()
293 *result->mutable_pcr1_quote() = database_pb.pcr1_quote(); in GetAttestationKeyInfoTask()
318 auto database_pb = database_->GetProtobuf(); in ActivateAttestationKeyTask() local
320 database_pb.delegate().blob(), database_pb.delegate().secret(), in ActivateAttestationKeyTask()
321 database_pb.identity_key().identity_key_blob(), in ActivateAttestationKeyTask()
473 auto database_pb = database_->GetProtobuf(); in IsPreparedForEnrollment() local
474 if (!database_pb.has_credentials()) { in IsPreparedForEnrollment()
478 database_pb.credentials().has_endorsement_credential() || in IsPreparedForEnrollment()
479 database_pb.credentials().has_default_encrypted_endorsement_credential()); in IsPreparedForEnrollment()
483 auto database_pb = database_->GetProtobuf(); in IsEnrolled() local
484 return database_pb.has_identity_key() && in IsEnrolled()
485 database_pb.identity_key().has_identity_credential(); in IsEnrolled()
494 auto database_pb = database_->GetProtobuf(); in CreateEnrollRequest() local
497 database_pb.credentials().default_encrypted_endorsement_credential(); in CreateEnrollRequest()
499 database_pb.identity_binding().identity_public_key()); in CreateEnrollRequest()
500 *request_pb.mutable_pcr0_quote() = database_pb.pcr0_quote(); in CreateEnrollRequest()
501 *request_pb.mutable_pcr1_quote() = database_pb.pcr1_quote(); in CreateEnrollRequest()
526 auto database_pb = database_->GetProtobuf(); in FinishEnroll() local
528 database_pb.delegate().blob(), database_pb.delegate().secret(), in FinishEnroll()
529 database_pb.identity_key().identity_key_blob(), in FinishEnroll()
567 auto database_pb = database_->GetProtobuf(); in CreateCertificateRequest() local
569 database_pb.identity_key().identity_credential()); in CreateCertificateRequest()
661 auto database_pb = database_->GetProtobuf(); in FindKeyByLabel() local
662 for (int i = 0; i < database_pb.device_keys_size(); ++i) { in FindKeyByLabel()
663 if (database_pb.device_keys(i).key_name() == key_label) { in FindKeyByLabel()
664 *key = database_pb.device_keys(i); in FindKeyByLabel()
687 auto database_pb = database_->GetProtobuf(); in CreateKey() local
689 key_type, key_usage, database_pb.identity_key().identity_key_blob(), in CreateKey()
737 auto* database_pb = database_->GetMutableProtobuf(); in AddDeviceKey() local
739 for (int i = 0; i < database_pb->device_keys_size(); ++i) { in AddDeviceKey()
740 if (database_pb->device_keys(i).key_name() == key_label) { in AddDeviceKey()
742 *database_pb->mutable_device_keys(i) = key; in AddDeviceKey()
747 *database_pb->add_device_keys() = key; in AddDeviceKey()
752 auto* database_pb = database_->GetMutableProtobuf(); in RemoveDeviceKey() local
754 for (int i = 0; i < database_pb->device_keys_size(); ++i) { in RemoveDeviceKey()
755 if (database_pb->device_keys(i).key_name() == key_label) { in RemoveDeviceKey()
757 int last = database_pb->device_keys_size() - 1; in RemoveDeviceKey()
759 database_pb->mutable_device_keys()->SwapElements(i, last); in RemoveDeviceKey()
761 database_pb->mutable_device_keys()->RemoveLast(); in RemoveDeviceKey()
806 auto database_pb = database_->GetProtobuf(); in ChooseTemporalIndex() local
807 for (int i = 0; i < database_pb.temporal_index_record_size(); ++i) { in ChooseTemporalIndex()
809 database_pb.temporal_index_record(i); in ChooseTemporalIndex()
834 database_pb.add_temporal_index_record(); in ChooseTemporalIndex()