/trusty/user/app/keymaster/device_unittest/ |
D | main.cpp | 79 ASSERT_NE(nullptr, write_key.get()); in TestKeyStorage() 81 error = ss_manager->WriteKeyToStorage(key_slot, write_key.get(), DATA_SIZE); in TestKeyStorage() 87 ASSERT_NE(nullptr, write_key.get()); in TestKeyStorage() 89 ASSERT_EQ(0, memcmp(write_key.get(), key_blob.key_material, DATA_SIZE)); in TestKeyStorage() 109 ASSERT_NE(nullptr, write_cert[i].get()); in TestCertChainStorage() 111 error = ss_manager->WriteCertToStorage(key_slot, write_cert[i].get(), in TestCertChainStorage() 129 ASSERT_EQ(0, memcmp(write_cert[i].get(), chain.entries[i].data, in TestCertChainStorage() 150 ASSERT_NE(nullptr, write_cert.get()); in TestCertStorageInvalid() 151 error = ss_manager->WriteCertToStorage(key_slot, write_cert.get(), in TestCertStorageInvalid() 202 ASSERT_NE(nullptr, write_uuid.get()); in TestUuidStorage() [all …]
|
/trusty/user/app/keymaster/host_unittest/ |
D | main.cpp | 88 ASSERT_NE(nullptr, write_key.get()); in TestKeyStorage() 90 error = ss_manager->WriteKeyToStorage(key_slot, write_key.get(), DATA_SIZE); in TestKeyStorage() 96 ASSERT_NE(nullptr, write_key.get()); in TestKeyStorage() 97 ASSERT_EQ(0, memcmp(write_key.get(), key_blob.writable_data(), DATA_SIZE)); in TestKeyStorage() 118 ASSERT_NE(nullptr, write_cert[i].get()); in TestCertChainStorage() 120 error = ss_manager->WriteCertToStorage(key_slot, write_cert[i].get(), in TestCertChainStorage() 138 ASSERT_EQ(0, memcmp(write_cert[i].get(), chain.entries[i].data, in TestCertChainStorage() 169 ASSERT_NE(nullptr, write_cert.get()); in TestCertStorageInvalid() 170 error = ss_manager->WriteCertToStorage(key_slot, write_cert.get(), in TestCertStorageInvalid() 227 ASSERT_NE(nullptr, write_uuid.get()); in TestUuidStorage() [all …]
|
/trusty/user/base/experimental/lib/tidl/include/lib/tidl/android-base/ |
D | unique_fd.h | 82 int get() const { return fd_; } in get() function 87 operator int() const { return get(); } // NOLINT 90 bool operator>=(int rhs) const { return get() >= rhs; } 91 bool operator<(int rhs) const { return get() < rhs; } 92 bool operator==(int rhs) const { return get() == rhs; } 93 bool operator!=(int rhs) const { return get() != rhs; } 95 return get() == rhs.get(); 98 return get() != rhs.get(); 104 bool ok() const { return get() >= 0; } in ok() 316 : fd_(ufd.get()) {} // NOLINT in borrowed_fd() [all …]
|
/trusty/user/base/lib/hwbcc/common/ |
D | common.cpp | 47 const cppbor::Int* key_type = cose_key->get(1)->asInt(); in validate_pub_key_ed25519() 48 const cppbor::Int* algorithm = cose_key->get(3)->asInt(); in validate_pub_key_ed25519() 49 const cppbor::Int* curve = cose_key->get(-1)->asInt(); in validate_pub_key_ed25519() 50 const cppbor::Bstr* key = cose_key->get(-2)->asBstr(); in validate_pub_key_ed25519() 86 const cppbor::Int* algorithm = params->get(1)->asInt(); in validate_protected_params() 135 const cppbor::Tstr* issuer = payload->get(1)->asTstr(); in validate_bcc_payload() 136 const cppbor::Tstr* subject = payload->get(2)->asTstr(); in validate_bcc_payload() 137 const cppbor::Bstr* subject_key = payload->get(-4670552)->asBstr(); in validate_bcc_payload() 138 const cppbor::Bstr* key_usage = payload->get(-4670553)->asBstr(); in validate_bcc_payload() 173 const cppbor::Bstr* protected_params = bcc_entry->get(0)->asBstr(); in validate_bcc_entry() [all …]
|
/trusty/user/app/secretkeeper/ |
D | store.rs | 79 fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error> { in get() method 153 expect_eq!(store.get(KEY1), Ok(Some(SECRET1.to_vec()))); in test_secretkeeper_store() 154 expect_eq!(store.get(KEY2), Ok(None)); in test_secretkeeper_store() 156 expect_eq!(store.get(KEY1), Ok(Some(SECRET2.to_vec()))); in test_secretkeeper_store() 157 expect_eq!(store.get(KEY2), Ok(None)); in test_secretkeeper_store() 159 expect_eq!(store.get(KEY1), Ok(Some(SECRET1.to_vec()))); in test_secretkeeper_store() 160 expect_eq!(store.get(KEY2), Ok(None)); in test_secretkeeper_store() 162 expect_eq!(store.get(KEY1), Ok(Some(SECRET1.to_vec()))); in test_secretkeeper_store() 163 expect_eq!(store.get(KEY2), Ok(Some(SECRET1.to_vec()))); in test_secretkeeper_store() 165 expect_eq!(store.get(KEY1), Ok(None)); in test_secretkeeper_store() [all …]
|
/trusty/user/base/lib/libstdc++-trusty/test/ |
D | libcxx_test.cpp | 135 ASSERT_EQ(p, a.get()); in TEST_F() 136 ASSERT_EQ(nullptr, b.get()); in TEST_F() 141 ASSERT_EQ(nullptr, a.get()); in TEST_F() 142 ASSERT_EQ(p, b.get()); in TEST_F() 146 ASSERT_EQ(nullptr, b.get()); in TEST_F() 159 ASSERT_NE(nullptr, a.get()); in TEST_F() 160 ASSERT_EQ(a.get(), b.get()); in TEST_F() 175 ASSERT_EQ(p, a.get()); in TEST_F() 176 ASSERT_EQ(nullptr, b.get()); in TEST_F() 181 ASSERT_EQ(nullptr, a.get()); in TEST_F() [all …]
|
/trusty/user/app/cast-auth/app/ |
D | cast_auth_impl.cc | 52 return rsa && RSA_size(rsa.get()) == RSA_2048_SIZE_BYTES; in is_plaintext_rsa_2048_private_key() 65 storage_session_t get() { return mSession; } in get() function in StorageSessionHandle 102 bssl::UniquePtr<RSA> rsa(d2i_RSAPrivateKey_bio(bio.get(), NULL)); in ProvisionKey() 103 if (!rsa || RSA_size(rsa.get()) != RSA_2048_SIZE_BYTES) { in ProvisionKey() 129 bssl::UniquePtr<RSA> rsa(d2i_RSAPrivateKey_bio(bio.get(), NULL)); in SignHash() 134 if (!RSA_check_key(rsa.get())) { in SignHash() 138 size_t expected_size = (size_t)RSA_size(rsa.get()); in SignHash() 141 rsa.get(), RSA_PKCS1_PADDING); in SignHash() 161 session.get(), &handle, kKeyPath, in SaveKey() 188 int rc = storage_open_file(session.get(), &handle, kKeyPath, 0, 0); in LoadKey()
|
/trusty/user/app/keymaster/ |
D | openssl_keymaster_enforcement.cpp | 54 EVP_MD_CTX* get() { return &ctx_; } in get() function in keymaster::__anonccc6f1bd0111::EvpMdCtx 69 if (EVP_DigestInit_ex(ctx.get(), EVP_sha256(), nullptr /* ENGINE */) && in CreateKeyId() 70 EVP_DigestUpdate(ctx.get(), key_blob.key_material, in CreateKeyId() 72 EVP_DigestFinal_ex(ctx.get(), hash, &hash_len)) { in CreateKeyId() 109 if (!HMAC_Init_ex(ctx.get(), key.key_material, key.key_material_size, in hmacSha256() 116 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256() 121 if (!HMAC_Final(ctx.get(), output->writable_data(), &digest_len)) { in hmacSha256() 174 if (!context_chunks.get()) in ComputeSharedHmac() 178 auto context_chunks_pos = context_chunks.get(); in ComputeSharedHmac() 185 assert(context_chunks_pos - num_chunks == context_chunks.get()); in ComputeSharedHmac() [all …]
|
D | secure_storage_manager.cpp | 155 err = WriteAttestationKey(key_slot, attestation_key.get(), true); in WriteKeyToStorage() 231 err = WriteAttestationKey(key_slot, attestation_key.get(), true); in WriteCertToStorage() 290 err = WriteAttestationKey(key_slot, attestation_key.get(), true); in DeleteCertChainFromStorage() 334 if (!km_attributes.get()) { in ReadKeymasterAttributes() 338 DecodeFromFile(KeymasterAttributes_fields, km_attributes.get(), in ReadKeymasterAttributes() 393 err = WriteKeymasterAttributes(km_attributes.get(), true); in WriteAttestationUuid() 409 err = WriteKeymasterAttributes(km_attributes.get(), true); in DeleteAttestationUuid() 434 err = WriteKeymasterAttributes(km_attributes.get(), true); in SetProductId() 576 keymaster_error_t err = WriteAttestationIds(result.ids.get(), true); in SetAttestationIdsKM3() 600 keymaster_error_t err = WriteAttestationIds(result.ids.get(), true); in SetAttestationIds() [all …]
|
D | trusty_aes_key.cpp | 213 if (!key->get()) { in LoadKey() 240 if (material->get() == nullptr) { in formatted_key_material() 250 rc = hwwsk_export_key(hchan, material->get(), HWWSK_MAX_MSG_SIZE, in formatted_key_material()
|
/trusty/user/base/lib/apploader_package/ |
D | cose.cpp | 117 SHA384_Update(&ctx, std::get<0>(data), std::get<1>(data)); in sha() 133 SHA256_Update(&ctx, std::get<0>(data), std::get<1>(data)); in sha() 157 if (EC_KEY_check_key(ecKey.get()) == 0) { in signEcDsaDigest() 162 const EC_GROUP* ecGroup = EC_KEY_get0_group(ecKey.get()); in signEcDsaDigest() 169 ECDSA_do_sign(dataDigest.data(), dataDigest.size(), ecKey.get()), in signEcDsaDigest() 175 size_t len = i2d_ECDSA_SIG(sig.get(), nullptr); in signEcDsaDigest() 179 i2d_ECDSA_SIG(sig.get(), &p); in signEcDsaDigest() 203 ECDSA_SIG_get0(sig.get(), &rBn, &sBn); in ecdsaSignatureDerToCose() 341 if (rBn.get() == nullptr) { in checkEcDsaSignature() 349 if (sBn.get() == nullptr) { in checkEcDsaSignature() [all …]
|
/trusty/user/app/confirmationui/examples/layouts/include/layouts/ |
D | layout.h | 214 translate(&std::get<LabelOK>(layoutInstance_)); in setLanguage() 215 translate(&std::get<LabelCancel>(layoutInstance_)); in setLanguage() 216 translate(&std::get<LabelTitle>(layoutInstance_)); in setLanguage() 217 translate(&std::get<LabelHint>(layoutInstance_)); in setLanguage() 221 std::get<LabelBody>(layoutInstance_) in setConfirmationMessage() 234 std::get<LabelOK>(layoutInstance_).setTextColor(color); in showInstructions() 235 std::get<LabelCancel>(layoutInstance_).setTextColor(color); in showInstructions() 257 return (std::get<Elements>(layout).draw(drawPixel) || ...); in drawElements()
|
/trusty/user/app/gatekeeper/ |
D | trusty_gatekeeper.cpp | 86 memset(rand_seed.get(), 0, RNG_RESEED_SIZE); in ReseedRng() 87 if (trusty_rng_secure_rand(rand_seed.get(), RNG_RESEED_SIZE) != NO_ERROR) { in ReseedRng() 91 trusty_rng_add_entropy(rand_seed.get(), RNG_RESEED_SIZE); in ReseedRng() 107 password_key_.get(), HMAC_SHA_256_KEY_SIZE); in DerivePasswordKey() 114 memset_s(password_key_.get(), 0, HMAC_SHA_256_KEY_SIZE); in ClearPasswordKey() 150 *auth_token_key = cached_auth_token_key_.get(); in GetAuthTokenKey() 158 *password_key = const_cast<const uint8_t*>(password_key_.get()); in GetPasswordKey() 332 if (!mem_records_.get()) { in InitMemoryRecords() 392 if (mem_records_.get()) { in RemoveUser()
|
/trusty/user/app/avb/ipc/ |
D | avb_ipc.cpp | 68 if (out_buf->get() == nullptr) { in ExecuteCommand() 73 if (rsp.Serialize(out_buf->get(), out_buf->get() + *out_size) != in ExecuteCommand() 145 struct iovec request_iov = {msg_buf.get(), msg_info.len}; in ProcessOneMessage() 168 reinterpret_cast<struct avb_message*>(msg_buf.get()); in ProcessOneMessage() 188 {out_buf.get(), out_size}, in ProcessOneMessage()
|
/trusty/user/app/storage/ |
D | aidl_service.cpp | 191 storage_client_session* get() { return active_ ? &inner_ : nullptr; } in get() function in storage_service::__anon42dd529a0111::StorageClientSession 232 storage_client_session* client_session = session->get(); in readNextFilenames() 317 storage_client_session* client_session = session->get(); in ~File() 349 storage_client_session* client_session = session->get(); in read() 386 storage_client_session* client_session = session->get(); in write() 394 storage_file_write(session->get(), file_handle_, offset, in write() 411 storage_client_session* client_session = session->get(); in getSize() 419 storage_err result = storage_file_get_size(session->get(), file_handle_, in getSize() 445 storage_client_session* client_session = session->get(); in setSize() 452 storage_err result = storage_file_set_size(session->get(), file_handle_, in setSize() [all …]
|
/trusty/user/app/gatekeeper/ipc/ |
D | gatekeeper_ipc.cpp | 84 if (out_buf->get() == NULL) { in exec_cmd() 89 if (rsp.Serialize(out_buf->get(), out_buf->get() + *out_size) != in exec_cmd() 182 struct iovec iov = {msg_buf.get(), msg_inf.len}; in handle_msg() 203 reinterpret_cast<struct gatekeeper_message*>(msg_buf.get()); in handle_msg() 216 err = send_response(chan, gk_msg->cmd, out_buf.get(), out_buf_size); in handle_msg()
|
/trusty/user/app/avb/ |
D | avb_messages.cpp | 102 memcpy(payload, attributes_.get(), attributes_size_); in Serialize() 112 if (!attributes_.get()) in Deserialize() 114 memcpy(attributes_.get(), payload, attributes_size_); in Deserialize()
|
/trusty/user/app/cast-auth/app/test-app/ |
D | main.cc | 243 ASSERT_NE(nullptr, state->sess.get()); in CastAuthTest_SetUp() 250 ASSERT_NE(nullptr, root.get()); in CastAuthTest_SetUp() 253 ASSERT_NE(nullptr, state->srv.get()); in CastAuthTest_SetUp()
|
/trusty/user/base/app/acvp/ |
D | keymaster_ckdf.cpp | 101 memcpy(fixed_data.get(), label.data, label.data_length); in KeymasterCKDF() 110 bssl::Span<const uint8_t>(fixed_data.get(), fixed_data_size), in KeymasterCKDF()
|
/trusty/user/app/keymaster/ipc/ |
D | keymaster_ipc.cpp | 183 if (out->get() == NULL) { in serialize_response() 188 rsp.Serialize(out->get(), out->get() + *out_size); in serialize_response() 298 if (key_buf->get() == NULL) { in get_auth_token_key() 304 memcpy(key_buf->get(), key.key_material, key.key_material_size); in get_auth_token_key() 317 if (ids_buf->get() == NULL) { in get_device_info() 322 ids->encode(ids_buf->get(), ids_buf->get() + ids->encodedSize()); in get_device_info() 732 if (msg_buf.get() == nullptr) { in handle_msg() 738 struct iovec iov = {msg_buf.get(), msg_inf.len}; in handle_msg() 761 reinterpret_cast<keymaster_message*>(msg_buf.get()); in handle_msg() 775 return send_response(chan, in_msg->cmd, out_buf.get(), out_buf_size); in handle_msg()
|
/trusty/user/app/sample/stats-test/consumer/ |
D | consumer.cpp | 254 atom_val.i = input_value.get<VendorAtomValue::intValue>(); in reportVendorAtom() 257 atom_val.l = input_value.get<VendorAtomValue::longValue>(); in reportVendorAtom() 260 atom_val.f = input_value.get<VendorAtomValue::floatValue>(); in reportVendorAtom() 264 input_value.get<VendorAtomValue::stringValue>()); in reportVendorAtom()
|
/trusty/user/app/sample/stats-test/relayer/ |
D | relayer.cpp | 56 assert(mStatsRelayer.get() != nullptr); in setInterface() 74 assert(mStatsRelayer.get() != nullptr); in setInterface()
|
/trusty/kernel/lib/trusty/ |
D | trusty_apps.ld | 36 /* pre-built secure apps get inserted here */ 46 /* pre-built secure apps manifest get inserted here */
|
/trusty/kernel/lib/sm/ |
D | README | 15 sm_get_boot_args - get a pointer/reference to boot parameter block
|
/trusty/user/app/keymint/ |
D | keymaster_attributes.rs | 170 self.cached_size.get() in get_cached_size() 201 descriptor.get(|| { in descriptor_static() 223 instance.get(KeymasterAttributes::new) in default_instance() 713 self.cached_size.get() in get_cached_size() 744 descriptor.get(|| { in descriptor_static() 801 instance.get(AttestationIds::new) in default_instance() 973 self.cached_size.get() in get_cached_size() 1004 descriptor.get(|| { in descriptor_static() 1026 instance.get(AttestationKey::new) in default_instance() 1151 self.cached_size.get() in get_cached_size() [all …]
|