/developtools/hdc/hdc_rust/src/host/ |
D | auth.rs | 45 let mut handshake = SessionHandShake { in usb_handshake_with_daemon() localVariable 53 send_handshake_to_daemon(&handshake, channel_id).await; in usb_handshake_with_daemon() 76 handshake.auth_type = config::AuthType::Publickey as u8; in usb_handshake_with_daemon() 77 handshake.buf = get_hostname()?; in usb_handshake_with_daemon() 78 handshake.buf.push(char::from_u32(12).unwrap()); in usb_handshake_with_daemon() 80 handshake.buf.push_str(pubkey_pem.as_str()); in usb_handshake_with_daemon() 81 send_handshake_to_daemon(&handshake, channel_id).await; in usb_handshake_with_daemon() 84 handshake.auth_type = config::AuthType::Signature as u8; in usb_handshake_with_daemon() 85 handshake.buf = get_signature_b64(&rsa, recv.buf)?; in usb_handshake_with_daemon() 86 send_handshake_to_daemon(&handshake, channel_id).await; in usb_handshake_with_daemon() [all …]
|
D | client.rs | 81 if let Err(e) = client.handshake().await { in run_client_mode() 159 pub async fn handshake(&mut self) -> io::Result<()> { in handshake() method
|
/developtools/hdc/src/daemon/ |
D | daemon.cpp | 408 …aemon::HandDaemonAuthInit(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) in InitMod() argument 411 handshake.authType = AUTH_PUBLICKEY; in InitMod() 412 handshake.buf = hSession->tokenRSA; in InitMod() 413 string bufString = SerialStruct::SerializeToString(handshake); in InitMod() 422 …mon::HandDaemonAuthPubkey(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) in InitMod() argument 428 if (!GetHostPubkeyInfo(handshake.buf, hostname, pubkey)) { in InitMod() 442 std::ref(handshake), channelId, hSession->sessionId, confirmmsg); in InitMod() 460 SendAuthSignMsg(handshake, channelId, hSession->sessionId, pubkey, hSession->tokenRSA); in InitMod() 466 EchoHandshakeMsg(handshake, channelId, hSession->sessionId, notifymsg); in InitMod() 525 …::HandDaemonAuthSignature(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) in InitMod() argument [all …]
|
D | daemon.h | 72 bool HandDaemonAuth(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 77 void DaemonSessionHandshakeInit(HSession &hSession, SessionHandShake &handshake); 82 … bool HandDaemonAuthInit(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 83 …ool HandDaemonAuthPubkey(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 84 … HandDaemonAuthSignature(HSession hSession, const uint32_t channelId, SessionHandShake &handshake); 93 void SendAuthSignMsg(SessionHandShake &handshake, 95 void SendAuthOkMsg(SessionHandShake &handshake, uint32_t channelid, 97 void AuthRejectLowClient(SessionHandShake &handshake, uint32_t channelid, uint32_t sessionid); 98 …void EchoHandshakeMsg(SessionHandShake &handshake, uint32_t channelid, uint32_t sessionid, string …
|
/developtools/hdc/src/host/ |
D | server.cpp | 416 bool HdcServer::HandServerAuth(HSession hSession, SessionHandShake &handshake) in HandServerAuth() argument 419 switch (handshake.authType) { in HandServerAuth() 422 if (!HdcAuth::GetPublicKeyinfo(handshake.buf)) { in HandServerAuth() 426 handshake.authType = AUTH_PUBLICKEY; in HandServerAuth() 427 bufString = SerialStruct::SerializeToString(handshake); in HandServerAuth() 436 if (!HdcAuth::RsaSignAndBase64(handshake.buf)) { in HandServerAuth() 440 handshake.authType = AUTH_SIGNATURE; in HandServerAuth() 441 bufString = SerialStruct::SerializeToString(handshake); in HandServerAuth() 448 WRITE_LOG(LOG_FATAL, "invalid auth type %d", handshake.authType); in HandServerAuth() 453 void HdcServer::UpdateHdiInfo(Hdc::HdcSessionBase::SessionHandShake &handshake, const string &conne… in UpdateHdiInfo() argument [all …]
|
D | server.h | 58 bool HandServerAuth(HSession hSession, SessionHandShake &handshake); 60 void UpdateHdiInfo(Hdc::HdcSessionBase::SessionHandShake &handshake, const string &connectKey);
|
/developtools/hdc/src/common/ |
D | channel.cpp | 43 struct ChannelHandShake handshake = {}; in GetChannelHandshake() local 44 if (strcpy_s(handshake.banner, sizeof(handshake.banner), HANDSHAKE_MESSAGE.c_str()) != EOK) { in GetChannelHandshake() 47 if (strcpy_s(handshake.connectKey, sizeof(handshake.connectKey), connectKey.c_str()) != EOK) { in GetChannelHandshake() 50 … ret.insert(ret.begin(), (uint8_t *)&handshake, (uint8_t *)&handshake + sizeof(ChannelHandShake)); in GetChannelHandshake()
|
D | session.cpp | 1081 SessionHandShake handshake = {}; in WorkThreadStartSession() local 1082 handshake.banner = HANDSHAKE_MESSAGE; in WorkThreadStartSession() 1083 handshake.sessionId = hSession->sessionId; in WorkThreadStartSession() 1084 handshake.connectKey = hSession->connectKey; in WorkThreadStartSession() 1086 handshake.version = Base::GetVersion() + HDC_MSG_HASH; in WorkThreadStartSession() 1087 WRITE_LOG(LOG_INFO, "set version = %s", handshake.version.c_str()); in WorkThreadStartSession() 1089 handshake.authType = AUTH_NONE; in WorkThreadStartSession() 1090 string hs = SerialStruct::SerializeToString(handshake); in WorkThreadStartSession() 1093 hSession->sessionId, handshake.authType, hs.c_str()); in WorkThreadStartSession()
|