Home
last modified time | relevance | path

Searched refs:get (Results 1 – 25 of 537) sorted by relevance

12345678910>>...22

/system/keymaster/
Dasymmetric_key.cpp50 if (!ASN1_BIT_STRING_set_bit(key_usage.get(), i, 0)) { in add_key_usage_extension()
59 if (!ASN1_BIT_STRING_set_bit(key_usage.get(), kDigitalSignatureKeyUsageBit, 1)) { in add_key_usage_extension()
68 if (!ASN1_BIT_STRING_set_bit(key_usage.get(), kKeyEnciphermentKeyUsageBit, 1) || in add_key_usage_extension()
69 !ASN1_BIT_STRING_set_bit(key_usage.get(), kDataEnciphermentKeyUsageBit, 1)) { in add_key_usage_extension()
75 int len = i2d_ASN1_BIT_STRING(key_usage.get(), nullptr); in add_key_usage_extension()
80 if (!asn1_key_usage.get()) { in add_key_usage_extension()
83 uint8_t* p = asn1_key_usage.get(); in add_key_usage_extension()
84 len = i2d_ASN1_BIT_STRING(key_usage.get(), &p); in add_key_usage_extension()
91 if (!key_usage_str.get() || in add_key_usage_extension()
92 !ASN1_OCTET_STRING_set(key_usage_str.get(), asn1_key_usage.get(), len)) { in add_key_usage_extension()
[all …]
Dhkdf.cpp37 if (salt_.get() != nullptr && salt_len_ > 0) { in GenerateKey()
38 result = prk_hmac.Init(salt_.get(), salt_len_); in GenerateKey()
41 if (zeros.get() == nullptr) in GenerateKey()
44 memset(zeros.get(), 0, digest_size_); in GenerateKey()
45 result = prk_hmac.Init(zeros.get(), digest_size_); in GenerateKey()
51 if (pseudo_random_key.get() == nullptr || digest_size_ != prk_hmac.DigestLength()) in GenerateKey()
54 prk_hmac.Sign(secret_key_.get(), secret_key_len_, pseudo_random_key.get(), digest_size_); in GenerateKey()
68 if (buf.get() == nullptr || digest.get() == nullptr) in GenerateKey()
71 result = hmac.Init(pseudo_random_key.get(), digest_size_); in GenerateKey()
78 memcpy(buf.get(), digest.get(), digest_size_); in GenerateKey()
[all …]
Dnist_curve_key_exchange.cpp30 if (!private_key_.get() || !EC_KEY_check_key(private_key_.get())) { in NistCurveKeyExchange()
59 if (!key.get() || !EC_KEY_generate_key(key.get())) { in GenerateKeyExchange()
71 const EC_GROUP* group = EC_KEY_get0_group(private_key_.get()); in ExtractPublicKey()
80 if (EC_POINT_point2oct(group, EC_KEY_get0_public_key(private_key_.get()), in ExtractPublicKey()
81 POINT_CONVERSION_UNCOMPRESSED, public_key_.get(), public_key_len_, in ExtractPublicKey()
98 const EC_GROUP* group = EC_KEY_get0_group(private_key_.get()); in CalculateSharedKey()
100 if (!point.get() || in CalculateSharedKey()
102 group, point.get(), peer_public_value, peer_public_value_len, in CalculateSharedKey()
104 !EC_POINT_is_on_curve(group, point.get(), nullptr /* ctx */)) { in CalculateSharedKey()
110 if (ECDH_compute_key(result.get(), shared_secret_len_, point.get(), private_key_.get(), in CalculateSharedKey()
[all …]
Docb_utils.cpp42 ae_ctx* get() { return ctx_; } in get() function in keymaster::AeCtx
56 if (!derivation_data->get()) in BuildDerivationData()
59 uint8_t* buf = derivation_data->get(); in BuildDerivationData()
60 uint8_t* end = derivation_data->get() + *derivation_data_length; in BuildDerivationData()
82 if (!hash_buf.get()) in InitializeKeyWrappingContext()
84 Eraser hash_eraser(hash_buf.get(), SHA256_DIGEST_LENGTH); in InitializeKeyWrappingContext()
86 if (!derived_key.get()) in InitializeKeyWrappingContext()
88 Eraser derived_key_eraser(derived_key.get(), AES_BLOCK_SIZE); in InitializeKeyWrappingContext()
90 if (!ctx->get() || !hash_buf.get() || !derived_key.get()) in InitializeKeyWrappingContext()
96 SHA256_Update(&sha256_ctx, derivation_data.get(), derivation_data_length); in InitializeKeyWrappingContext()
[all …]
Drsa_key_factory.cpp80 if (exponent.get() == NULL || rsa_key.get() == NULL || pkey.get() == NULL) in GenerateKey()
83 if (!BN_set_word(exponent.get(), public_exponent) || in GenerateKey()
84 !RSA_generate_key_ex(rsa_key.get(), key_size, exponent.get(), NULL /* callback */)) in GenerateKey()
87 if (EVP_PKEY_set1_RSA(pkey.get(), rsa_key.get()) != 1) in GenerateKey()
91 keymaster_error_t error = EvpKeyToKeyMaterial(pkey.get(), &key_material); in GenerateKey()
135 UniquePtr<RSA, RsaKey::RSA_Delete> rsa_key(EVP_PKEY_get1_RSA(pkey.get())); in UpdateImportKeyDescription()
136 if (!rsa_key.get()) in UpdateImportKeyDescription()
152 *key_size = RSA_size(rsa_key.get()) * 8; in UpdateImportKeyDescription()
155 if (RSA_size(rsa_key.get()) * 8 != *key_size) { in UpdateImportKeyDescription()
157 RSA_size(rsa_key.get()) * 8, *key_size); in UpdateImportKeyDescription()
[all …]
Dec_key_factory.cpp96 if (ec_key.get() == NULL || pkey.get() == NULL) in GenerateKey()
100 if (group.get() == NULL) { in GenerateKey()
106 EC_GROUP_set_point_conversion_form(group.get(), POINT_CONVERSION_UNCOMPRESSED); in GenerateKey()
107 EC_GROUP_set_asn1_flag(group.get(), OPENSSL_EC_NAMED_CURVE); in GenerateKey()
110 if (EC_KEY_set_group(ec_key.get(), group.get()) != 1 || in GenerateKey()
111 EC_KEY_generate_key(ec_key.get()) != 1 || EC_KEY_check_key(ec_key.get()) < 0) { in GenerateKey()
115 if (EVP_PKEY_set1_EC_KEY(pkey.get(), ec_key.get()) != 1) in GenerateKey()
119 error = EvpKeyToKeyMaterial(pkey.get(), &key_material); in GenerateKey()
161 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(pkey.get())); in UpdateImportKeyDescription()
162 if (!ec_key.get()) in UpdateImportKeyDescription()
[all …]
/system/gatekeeper/tests/
Dgatekeeper_messages_test.cpp56 msg.Serialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() + serialized_msg.length); in TEST()
59 deserialized_msg.Deserialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() in TEST()
68 …ASSERT_EQ(0, memcmp(msg.provided_password.buffer.get(), deserialized_password->buffer.get(), passw… in TEST()
70 ASSERT_EQ(NULL, deserialized_msg.enrolled_password.buffer.get()); in TEST()
72 ASSERT_EQ(NULL, deserialized_msg.password_handle.buffer.get()); in TEST()
85 msg.Serialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() + serialized_msg.length); in TEST()
88 deserialized_msg.Deserialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() in TEST()
97 …ASSERT_EQ(0, memcmp(msg.provided_password.buffer.get(), deserialized_password->buffer.get(), passw… in TEST()
99 ASSERT_EQ(NULL, deserialized_msg.enrolled_password.buffer.get()); in TEST()
101 ASSERT_EQ(NULL, deserialized_msg.password_handle.buffer.get()); in TEST()
[all …]
/system/security/softkeymaster/
Dkeymaster_openssl.cpp129 if (derData.get() == NULL) { in wrap_key()
133 unsigned char* p = derData.get(); in wrap_key()
212 if (pkey.get() == NULL) { in unwrap_key()
216 EVP_PKEY* tmp = pkey.get(); in unwrap_key()
237 if (DSA_generate_parameters_ex(dsa.get(), dsa_params->key_size, NULL, 0, NULL, NULL, in generate_dsa_keypair()
262 if (DSA_generate_key(dsa.get()) != 1) { in generate_dsa_keypair()
267 if (EVP_PKEY_assign_DSA(pkey, dsa.get()) == 0) { in generate_dsa_keypair()
295 if (group.get() == NULL) { in generate_ec_keypair()
301 EC_GROUP_set_point_conversion_form(group.get(), POINT_CONVERSION_UNCOMPRESSED); in generate_ec_keypair()
302 EC_GROUP_set_asn1_flag(group.get(), OPENSSL_EC_NAMED_CURVE); in generate_ec_keypair()
[all …]
/system/connectivity/shill/
Ddefault_profile_unittest.cc101 EXPECT_CALL(*storage.get(), GetGroups()) in TEST_F()
135 EXPECT_CALL(*storage.get(), SetBool(DefaultProfile::kStorageId, in TEST_F()
139 EXPECT_CALL(*storage.get(), SetString(DefaultProfile::kStorageId, in TEST_F()
143 EXPECT_CALL(*storage.get(), SetString(DefaultProfile::kStorageId, in TEST_F()
147 EXPECT_CALL(*storage.get(), SetBool(DefaultProfile::kStorageId, in TEST_F()
151 EXPECT_CALL(*storage.get(), SetString(DefaultProfile::kStorageId, in TEST_F()
155 EXPECT_CALL(*storage.get(), in TEST_F()
160 EXPECT_CALL(*storage.get(), in TEST_F()
165 EXPECT_CALL(*storage.get(), in TEST_F()
170 EXPECT_CALL(*storage.get(), in TEST_F()
[all …]
Dconnection_health_checker.cc99 socket_.get(), in ConnectionHealthChecker()
139 SLOG(connection_.get(), 2) << __func__ << ": Malformed url: " in AddRemoteURL()
144 SLOG(connection_.get(), 2) << __func__ in AddRemoteURL()
161 SLOG(connection_.get(), 2) << __func__ << ": Failed to start DNS client " in AddRemoteURL()
170 SLOG(connection_.get(), 2) << __func__ in Start()
174 if (!connection_.get()) { in Start()
175 SLOG(connection_.get(), 2) << __func__ << ": Connection not ready yet."; in Start()
188 SLOG(connection_.get(), 2) << __func__ << ": Not enough IPs."; in Start()
198 if (tcp_connection_.get() != nullptr) in Stop()
210 SLOG(connection_.get(), 3) << __func__; in SetConnection()
[all …]
Dtraffic_monitor.cc61 SLOG(device_.get(), 2) << __func__; in Start()
71 SLOG(device_.get(), 2) << __func__; in Stop()
82 SLOG(device_.get(), 2) << __func__ << ": Tx-queues decongested"; in ResetCongestedTxQueuesStatsWithLogging()
89 SLOG(device_.get(), 3) << __func__; in BuildIPPortToTxQueueLength()
92 SLOG(device_.get(), 4) << "SocketInfo(IP=" in BuildIPPortToTxQueueLength()
103 SLOG(device_.get(), 4) << "Connection Filtered."; in BuildIPPortToTxQueueLength()
106 SLOG(device_.get(), 3) << "Monitoring connection: TX=" in BuildIPPortToTxQueueLength()
119 SLOG(device_.get(), 4) << __func__; in IsCongestedTxQueues()
123 SLOG(device_.get(), 3) << __func__ << ": Empty socket info"; in IsCongestedTxQueues()
131 SLOG(device_.get(), 3) << __func__ << ": No interesting socket info"; in IsCongestedTxQueues()
[all …]
Ddevice_unittest.cc259 return static_cast<DeviceMockAdaptor*>(device_->adaptor_.get()); in GetDeviceMockAdaptor()
342 ASSERT_FALSE(device_->ipconfig_.get()); in TEST_F()
347 ASSERT_FALSE(device_->ipconfig_.get()); in TEST_F()
348 ASSERT_FALSE(device_->ip6config_.get()); in TEST_F()
349 ASSERT_FALSE(device_->dhcpv6_config_.get()); in TEST_F()
353 ASSERT_FALSE(device_->ipconfig_.get()); in TEST_F()
354 ASSERT_FALSE(device_->ip6config_.get()); in TEST_F()
355 ASSERT_FALSE(device_->dhcpv6_config_.get()); in TEST_F()
357 ASSERT_FALSE(device_->ipconfig_.get()); in TEST_F()
358 ASSERT_FALSE(device_->ip6config_.get()); in TEST_F()
[all …]
Dmanager_unittest.cc203 return (devices.size() == 1 && devices[0].get() == device.get()); in IsDeviceRegistered()
352 EXPECT_NE(nullptr, manager()->device_claimer_.get()); in VerifyPassiveMode()
525 return (svc0.get() == manager()->services_[0].get() && in ServiceOrderIs()
526 svc1.get() == manager()->services_[1].get()); in ServiceOrderIs()
556 ON_CALL(*mock_devices_[0].get(), technology()) in TEST_F()
558 ON_CALL(*mock_devices_[1].get(), technology()) in TEST_F()
579 ON_CALL(*mock_devices_[0].get(), technology()) in TEST_F()
581 ON_CALL(*mock_devices_[1].get(), technology()) in TEST_F()
583 ON_CALL(*mock_devices_[2].get(), technology()) in TEST_F()
599 EXPECT_CALL(*mock_devices_[0].get(), SetEnabled(true)) in TEST_F()
[all …]
Ddaemon_task.cc101 control_.reset(new BinderControl(dispatcher_.get())); in Init()
103 control_.reset(new ChromeosDBusControl(dispatcher_.get())); in Init()
108 metrics_.reset(new Metrics(dispatcher_.get())); in Init()
115 callback80211_metrics_.reset(new Callback80211Metrics(metrics_.get())); in Init()
117 manager_.reset(new Manager(control_.get(), dispatcher_.get(), metrics_.get(), in Init()
122 manager_.get(), base::Bind(&DaemonTask::Start, base::Unretained(this))); in Init()
171 dhcp_provider_->Init(control_.get(), dispatcher_.get(), metrics_.get()); in Start()
172 process_manager_->Init(dispatcher_.get()); in Start()
/system/update_engine/update_manager/
Dreal_updater_provider.h48 return var_last_checked_time_.get(); in var_last_checked_time()
52 return var_update_completed_time_.get(); in var_update_completed_time()
56 return var_progress_.get(); in var_progress()
60 return var_stage_.get(); in var_stage()
64 return var_new_version_.get(); in var_new_version()
68 return var_payload_size_.get(); in var_payload_size()
72 return var_curr_channel_.get(); in var_curr_channel()
76 return var_new_channel_.get(); in var_new_channel()
80 return var_p2p_enabled_.get(); in var_p2p_enabled()
84 return var_cellular_enabled_.get(); in var_cellular_enabled()
[all …]
Dreal_state.h48 return config_provider_.get(); in config_provider()
51 return device_policy_provider_.get(); in device_policy_provider()
54 return random_provider_.get(); in random_provider()
57 return shill_provider_.get(); in shill_provider()
60 return system_provider_.get(); in system_provider()
63 return time_provider_.get(); in time_provider()
66 return updater_provider_.get(); in updater_provider()
/system/connectivity/shill/dbus/
Dchromeos_manager_dbus_adaptor_unittest.cc92 EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
97 manager_adaptor_.ClaimInterface(&error, message.get(), kNonDefaultClaimerName, in TEST_F()
99 EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
103 EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
108 manager_adaptor_.ClaimInterface(&error, message.get(), kDefaultClaimerName, in TEST_F()
110 EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
114 EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
119 manager_adaptor_.ClaimInterface(&error, message.get(), kNonDefaultClaimerName, in TEST_F()
121 EXPECT_NE(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); in TEST_F()
138 manager_adaptor_.ReleaseInterface(&error, message.get(), kClaimerName, in TEST_F()
[all …]
/system/webservd/webservd/
Dutils.cc61 CHECK(cert.get()); in CreateCertificate()
62 X509_set_version(cert.get(), 2); // Using X.509 v3 certificate... in CreateCertificate()
65 ASN1_INTEGER* sn = X509_get_serialNumber(cert.get()); in CreateCertificate()
68 X509_time_adj(X509_get_notBefore(cert.get()), 0, &current_time); in CreateCertificate()
69 X509_time_adj(X509_get_notAfter(cert.get()), cert_expiration.InSeconds(), in CreateCertificate()
73 X509_NAME* name = X509_get_subject_name(cert.get()); in CreateCertificate()
80 X509_set_issuer_name(cert.get(), name); in CreateCertificate()
87 CHECK(rsa_key_pair.get()); in GenerateRSAKeyPair()
89 CHECK(big_num.get()); in GenerateRSAKeyPair()
90 CHECK(BN_set_word(big_num.get(), 65537)); in GenerateRSAKeyPair()
[all …]
/system/tpm/tpm_manager/server/
Dmain.cc57 local_data_store_.get(), in TpmManagerDaemon()
58 tpm_status_.get())); in TpmManagerDaemon()
59 tpm_nvram_.reset(new tpm_manager::Tpm2NvramImpl(local_data_store_.get())); in TpmManagerDaemon()
63 local_data_store_.get(), in TpmManagerDaemon()
64 tpm_status_.get())); in TpmManagerDaemon()
65 tpm_nvram_.reset(new tpm_manager::TpmNvramImpl(local_data_store_.get())); in TpmManagerDaemon()
69 local_data_store_.get(), in TpmManagerDaemon()
70 tpm_status_.get(), in TpmManagerDaemon()
71 tpm_initializer_.get(), in TpmManagerDaemon()
72 tpm_nvram_.get())); in TpmManagerDaemon()
[all …]
/system/extras/memcpy-perf/
Dmemcpy-perf.cpp48 memset(src.get(), 1, size_end); in main()
66 memcpy_noinline(src.get(), dst.get(), cur_size); in main()
67 memset_noinline(dst.get(), 0xdeadbeef, cur_size); in main()
70 memset_noinline(dst.get(), 0xdeadbeef, cur_size); in main()
76 memcpy_noinline(dst.get(), src.get(), cur_size); in main()
77 memcpy_noinline(src.get(), dst.get(), cur_size); in main()
80 memcpy_noinline(dst.get(), src.get(), cur_size); in main()
87 s += sum(src.get(), cur_size); in main()
90 s += sum(src.get(), cur_size); in main()
/system/weaved/buffet/
Davahi_mdns_client.cc58 avahi_threaded_poll_get(thread_pool_.get()), {}, in AvahiMdnsClient()
62 avahi_threaded_poll_start(thread_pool_.get()); in AvahiMdnsClient()
64 group_.reset(avahi_entry_group_new(client_.get(), HandleGroupStateChanged, in AvahiMdnsClient()
66 CHECK(group_) << avahi_strerror(avahi_client_errno(client_.get())) in AvahiMdnsClient()
72 avahi_threaded_poll_stop(thread_pool_.get()); in ~AvahiMdnsClient()
106 group_.get(), AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, {}, in PublishService()
107 service_name_.c_str(), service_type.c_str(), nullptr, txt_list.get()); in PublishService()
114 avahi_entry_group_reset(group_.get()); in PublishService()
115 CHECK(avahi_entry_group_is_empty(group_.get())); in PublishService()
118 group_.get(), AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, {}, in PublishService()
[all …]
/system/tpm/attestation/server/
Ddbus_service_test.cc47 mock_bus_.get(), path); in SetUp()
49 .WillByDefault(Return(mock_exported_object_.get())); in SetUp()
103 dbus::MessageWriter writer(call.get()); in TEST_F()
105 auto response = CallMethod(call.get()); in TEST_F()
106 dbus::MessageReader reader(response.get()); in TEST_F()
126 dbus::MessageWriter writer(call.get()); in TEST_F()
128 auto response = CallMethod(call.get()); in TEST_F()
129 dbus::MessageReader reader(response.get()); in TEST_F()
155 dbus::MessageWriter writer(call.get()); in TEST_F()
157 auto response = CallMethod(call.get()); in TEST_F()
[all …]
/system/webservd/libwebserv/
Ddbus_server.cc56 std::string protocol_handler_id = std::get<0>(in_request_info); in ProcessRequest()
57 std::string request_handler_id = std::get<1>(in_request_info); in ProcessRequest()
58 std::string request_id = std::get<2>(in_request_info); in ProcessRequest()
59 std::string url = std::get<3>(in_request_info); in ProcessRequest()
60 std::string method = std::get<4>(in_request_info); in ProcessRequest()
75 if (std::get<0>(tuple)) in ProcessRequest()
76 request->post_data_.emplace(std::get<1>(tuple), std::get<2>(tuple)); in ProcessRequest()
78 request->get_data_.emplace(std::get<1>(tuple), std::get<2>(tuple)); in ProcessRequest()
82 request->headers_.emplace(std::get<0>(tuple), std::get<1>(tuple)); in ProcessRequest()
86 std::get<1>(tuple), // field_name in ProcessRequest()
[all …]
/system/connectivity/shill/cellular/
Dcellular_error_unittest.cc74 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
83 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
92 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
101 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
110 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
119 CellularError::FromChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
136 CellularError::FromMM1ChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
145 CellularError::FromMM1ChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
154 CellularError::FromMM1ChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
163 CellularError::FromMM1ChromeosDBusError(dbus_error.get(), &shill_error); in TEST_F()
[all …]
/system/gatekeeper/
Dgatekeeper_messages.cpp43 memcpy(*buffer, to_append->buffer.get(), to_append->length); in append_to_buffer()
59 memcpy(target->buffer.get(), *buffer, target->length); in read_from_buffer()
150 if (password_handle.buffer.get()) { in ~VerifyRequest()
154 if (provided_password.buffer.get()) { in ~VerifyRequest()
155 memset_s(provided_password.buffer.get(), 0, provided_password.length); in ~VerifyRequest()
175 if (password_handle.buffer.get()) { in nonErrorDeserialize()
179 if (provided_password.buffer.get()) { in nonErrorDeserialize()
180 memset_s(provided_password.buffer.get(), 0, provided_password.length); in nonErrorDeserialize()
227 if (auth_token.buffer.get()) { in nonErrorDeserialize()
270 if (provided_password.buffer.get()) { in ~EnrollRequest()
[all …]

12345678910>>...22