Home
last modified time | relevance | path

Searched refs:peer_info (Results 1 – 13 of 13) sorted by relevance

/system/core/adb/client/pairing/tests/
Dpairing_connection_test.cpp194 auto server_callback = [&](const PeerInfo* peer_info, const std::vector<uint8_t>* cert, in TEST_F()
196 ASSERT_NE(nullptr, peer_info); in TEST_F()
202 ASSERT_EQ(strlen(peer_info->name), strlen(client_info_.name)); in TEST_F()
203 EXPECT_EQ(::memcmp(peer_info->name, client_info_.name, strlen(client_info_.name)), 0); in TEST_F()
204 ASSERT_EQ(strlen(peer_info->guid), strlen(client_info_.guid)); in TEST_F()
205 EXPECT_EQ(::memcmp(peer_info->guid, client_info_.guid, strlen(client_info_.guid)), 0); in TEST_F()
219 auto client_callback = [&](const PeerInfo* peer_info, const std::vector<uint8_t>* cert, in TEST_F()
221 ASSERT_NE(nullptr, peer_info); in TEST_F()
227 ASSERT_EQ(strlen(peer_info->name), strlen(server_info_.name)); in TEST_F()
228 EXPECT_EQ(::memcmp(peer_info->name, server_info_.name, strlen(server_info_.name)), 0); in TEST_F()
[all …]
Dpairing_server.cpp56 explicit PairingServerImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
133 PairingServerImpl::PairingServerImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingServerImpl() argument
135 : pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key), port_(port) { in PairingServerImpl()
137 CHECK('\0' == peer_info.name[kPeerNameLength - 1] && in PairingServerImpl()
138 '\0' == peer_info.guid[kPeerGuidLength - 1] && strlen(peer_info.name) > 0 && in PairingServerImpl()
139 strlen(peer_info.guid) > 0); in PairingServerImpl()
322 [fd](const PeerInfo* peer_info, const Data* cert, void* opaque) { in connectionEventsWorker() argument
326 if (peer_info != nullptr && cert != nullptr) { in connectionEventsWorker()
327 event = std::make_tuple(fd, std::string(peer_info->name), in connectionEventsWorker()
328 std::string(peer_info->guid), Data(*cert)); in connectionEventsWorker()
[all …]
Dpairing_server.h61 static std::unique_ptr<PairingServer> create(const Data& pswd, const PeerInfo& peer_info,
/system/core/adb/pairing_connection/tests/
Dpairing_client.cpp50 explicit PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
63 static ConnectionPtr CreatePairingConnection(const Data& pswd, const PeerInfo& peer_info,
66 static void PairingResultCallback(const PeerInfo* peer_info, int fd, void* opaque);
91 const PeerInfo& peer_info, in CreatePairingConnection() argument
94 pairing_connection_client_new(pswd.data(), pswd.size(), &peer_info, cert.data(), in CreatePairingConnection()
99 PairingClientImpl::PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingClientImpl() argument
102 peer_info_(peer_info), in PairingClientImpl()
156 void PairingClientImpl::PairingResultCallback(const PeerInfo* peer_info, int /* fd */, in PairingResultCallback() argument
159 p->cb_(peer_info, p->opaque_); in PairingResultCallback()
191 std::unique_ptr<PairingClient> PairingClient::Create(const Data& pswd, const PeerInfo& peer_info, in Create() argument
[all …]
Dpairing_connection_test.cpp151 static void ResultCallback(const PeerInfo* peer_info, void* opaque) { in ResultCallback()
155 if (peer_info) { in ResultCallback()
156 memcpy(&(p->peer_info_), peer_info, sizeof(PeerInfo)); in ResultCallback()
158 p->is_valid_ = (peer_info != nullptr); in ResultCallback()
194 static ServerPtr CreateServer(const std::vector<uint8_t>& pswd, const PeerInfo* peer_info, in CreateServer() argument
198 pswd.data(), pswd.size(), peer_info, reinterpret_cast<const uint8_t*>(cert.data()), in CreateServer()
Dpairing_client.h60 static std::unique_ptr<PairingClient> Create(const Data& pswd, const PeerInfo& peer_info,
/system/core/adb/client/pairing/
Dpairing_client.cpp50 explicit PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
62 static void OnPairingResult(const PeerInfo* peer_info, int fd, void* opaque);
87 PairingClientImpl::PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingClientImpl() argument
89 : pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key) { in PairingClientImpl()
155 void PairingClientImpl::OnPairingResult(const PeerInfo* peer_info, int /* fd */, void* opaque) { in OnPairingResult() argument
157 p->cb_(peer_info, p->opaque_); in OnPairingResult()
163 std::unique_ptr<PairingClient> PairingClient::Create(const Data& pswd, const PeerInfo& peer_info, in Create() argument
169 return std::unique_ptr<PairingClient>(new PairingClientImpl(pswd, peer_info, cert, priv_key)); in Create()
Dpairing_client.h60 static std::unique_ptr<PairingClient> Create(const Data& pswd, const PeerInfo& peer_info,
/system/core/adb/pairing_connection/
Dpairing_server.cpp59 explicit PairingServerCtx(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
91 static ConnectionPtr CreatePairingConnection(const Data& pswd, const PeerInfo& peer_info,
111 static void PairingConnectionCallback(const PeerInfo* peer_info, int fd, void* opaque);
145 const PeerInfo& peer_info, in CreatePairingConnection() argument
148 return ConnectionPtr(pairing_connection_server_new(pswd.data(), pswd.size(), &peer_info, in CreatePairingConnection()
153 PairingServerCtx::PairingServerCtx(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingServerCtx() argument
155 : pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key), port_(port) { in PairingServerCtx()
301 void PairingServerCtx::PairingConnectionCallback(const PeerInfo* peer_info, int fd, void* opaque) { in PairingConnectionCallback() argument
305 if (peer_info != nullptr) { in PairingConnectionCallback()
306 if (peer_info->type == ADB_RSA_PUB_KEY) { in PairingConnectionCallback()
[all …]
Dpairing_connection.cpp78 explicit PairingConnectionCtx(Role role, const Data& pswd, const PeerInfo& peer_info,
153 PairingConnectionCtx::PairingConnectionCtx(Role role, const Data& pswd, const PeerInfo& peer_info, in PairingConnectionCtx() argument
155 : role_(role), pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key) { in PairingConnectionCtx()
451 size_t pswd_len, const PeerInfo* peer_info, in CreateConnection() argument
460 CHECK(peer_info); in CreateConnection()
464 return new PairingConnectionCtx(role, vec_pswd, *peer_info, vec_x509_cert, vec_priv_key); in CreateConnection()
468 const PeerInfo* peer_info, in pairing_connection_client_new() argument
471 return CreateConnection(PairingConnectionCtx::Role::Client, pswd, pswd_len, peer_info, in pairing_connection_client_new()
476 const PeerInfo* peer_info, in pairing_connection_server_new() argument
479 return CreateConnection(PairingConnectionCtx::Role::Server, pswd, pswd_len, peer_info, in pairing_connection_server_new()
/system/core/adb/pairing_connection/include/adb/pairing/
Dpairing_server.h84 const PeerInfo* peer_info, const uint8_t* x509_cert_pem,
102 const PeerInfo* peer_info, uint16_t port)
Dpairing_connection.h98 const PeerInfo* peer_info,
117 const PeerInfo* peer_info,
/system/core/adb/client/
Dadb_wifi.cpp44 static void OnResult(const PeerInfo* peer_info, void* opaque) { in OnResult()
49 if (peer_info) { in OnResult()
50 memcpy(&(p->peer_info_), peer_info, sizeof(PeerInfo)); in OnResult()
52 p->is_valid_ = (peer_info != nullptr); in OnResult()