Lines Matching refs:handshake
201 …HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, SessionHandShake &handshake) in HandDaemonAuth() argument
204 switch (handshake.authType) { in HandDaemonAuth()
207 handshake.authType = AUTH_TOKEN; in HandDaemonAuth()
208 handshake.buf = hSession->tokenRSA; in HandDaemonAuth()
209 string bufString = SerialStruct::SerializeToString(handshake); in HandDaemonAuth()
225 … reinterpret_cast<uint8_t *>(const_cast<char *>(handshake.buf.c_str())), handshake.buf.size())) { in HandDaemonAuth()
227 handshake.authType = AUTH_TOKEN; in HandDaemonAuth()
228 handshake.buf = hSession->tokenRSA; in HandDaemonAuth()
229 string bufString = SerialStruct::SerializeToString(handshake); in HandDaemonAuth()
238 ret = HdcAuth::PostUIConfirm(handshake.buf); in HandDaemonAuth()
253 SessionHandShake handshake; in DaemonSessionHandshake() local
255 SerialStruct::ParseFromString(handshake, s); in DaemonSessionHandshake()
260 if (handshake.banner != HANDSHAKE_MESSAGE) { in DaemonSessionHandshake()
265 if (handshake.authType == AUTH_NONE) { in DaemonSessionHandshake()
268 hSession->sessionId = handshake.sessionId; in DaemonSessionHandshake()
269 hSession->connectKey = handshake.connectKey; in DaemonSessionHandshake()
274 handshake.ToDebugString().c_str()); in DaemonSessionHandshake()
284 handshake.sessionId = 0; in DaemonSessionHandshake()
285 handshake.connectKey = ""; in DaemonSessionHandshake()
287 if (enableSecure && !HandDaemonAuth(hSession, channelId, handshake)) { in DaemonSessionHandshake()
292 WRITE_LOG(LOG_FATAL, "receive hs version = %s", handshake.version.c_str()); in DaemonSessionHandshake()
294 if (!handshake.version.empty() && handshake.version != version) { in DaemonSessionHandshake()
296 handshake.version.c_str(), version.c_str()); in DaemonSessionHandshake()
299 handshake.banner = HANDSHAKE_FAILED; in DaemonSessionHandshake()
300 string failedString = SerialStruct::SerializeToString(handshake); in DaemonSessionHandshake()
306 if (handshake.version.empty()) { in DaemonSessionHandshake()
307 handshake.version = Base::GetVersion(); in DaemonSessionHandshake()
308 WRITE_LOG(LOG_FATAL, "set version if check mode = %s", handshake.version.c_str()); in DaemonSessionHandshake()
317 handshake.authType = AUTH_OK; in DaemonSessionHandshake()
318 handshake.buf = hostName; in DaemonSessionHandshake()
319 string bufString = SerialStruct::SerializeToString(handshake); in DaemonSessionHandshake()