Lines Matching defs:handshake
150 bool HdcDaemon::HandDaemonAuth(HSession hSession, const uint32_t channelId, SessionHandShake &handshake)
153 switch (handshake.authType) {
156 handshake.authType = AUTH_TOKEN;
157 handshake.buf = hSession->tokenRSA;
158 string bufString = SerialStruct::SerializeToString(handshake);
172 (uint8_t *)handshake.buf.c_str(), handshake.buf.size())) {
174 handshake.authType = AUTH_TOKEN;
175 handshake.buf = hSession->tokenRSA;
176 string bufString = SerialStruct::SerializeToString(handshake);
185 ret = HdcAuth::PostUIConfirm(handshake.buf);
197 // session handshake step2
199 SessionHandShake handshake;
201 SerialStruct::ParseFromString(handshake, s);
203 if (handshake.banner != HANDSHAKE_MESSAGE) {
208 if (handshake.authType == AUTH_NONE) {
209 // daemon handshake 1st packet
211 hSession->sessionId = handshake.sessionId;
212 hSession->connectKey = handshake.connectKey;
218 handshake.sessionId = 0;
219 handshake.connectKey = "";
221 if (enableSecure && !HandDaemonAuth(hSession, channelId, handshake)) {
224 // handshake auth OK.Can append the sending device information to HOST
228 handshake.authType = AUTH_OK;
229 handshake.buf = hostName;
230 string bufString = SerialStruct::SerializeToString(handshake);
247 // session handshake step2