Lines Matching refs:sessionId

434         WRITE_LOG(LOG_INFO, "client support RSA_3072_SHA512 auth for %u session", hSession->sessionId);
437 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE,
441 InitSessionAuthInfo(hSession->sessionId, hSession->tokenRSA);
452 WRITE_LOG(LOG_FATAL, "get pubkey failed for %u", hSession->sessionId);
464 std::thread notifymsg([this, &handshake, channelId, sessionId = hSession->sessionId, &confirmmsg]() {
465 this->EchoHandshakeMsg(handshake, channelId, sessionId, confirmmsg);
471 WRITE_LOG(LOG_FATAL, "user allow onece for %u", hSession->sessionId);
474 WRITE_LOG(LOG_FATAL, "user allow forever for %u", hSession->sessionId);
478 WRITE_LOG(LOG_FATAL, "user refuse for %u", hSession->sessionId);
484 SendAuthSignMsg(handshake, channelId, hSession->sessionId, pubkey, hSession->tokenRSA);
490 EchoHandshakeMsg(handshake, channelId, hSession->sessionId, notifymsg);
508 WRITE_LOG(LOG_FATAL, "base64 decode token sign failed for session %u", hSession->sessionId);
513 WRITE_LOG(LOG_FATAL, "verify failed for session %u", hSession->sessionId);
517 WRITE_LOG(LOG_FATAL, "sign verify failed for session %u with exception %s", hSession->sessionId, e.what());
521 WRITE_LOG(LOG_FATAL, "sign verify success for session %u", hSession->sessionId);
543 WRITE_LOG(LOG_FATAL, "invalid base64 sign size %zd for session %u", tokenSign.size(), hSession->sessionId);
586 WRITE_LOG(LOG_FATAL, "bio failed for session %u", hSession->sessionId);
591 WRITE_LOG(LOG_FATAL, "bio write failed %d for session %u", wbytes, hSession->sessionId);
596 WRITE_LOG(LOG_FATAL, "rsa failed for session %u", hSession->sessionId);
634 WRITE_LOG(LOG_FATAL, "decrypt failed(%lu) for session %u", ERR_get_error(), hSession->sessionId);
639 WRITE_LOG(LOG_FATAL, "auth failed for session %u)", hSession->sessionId);
654 string token = GetSessionAuthToken(hSession->sessionId);
655 string pubkey = GetSessionAuthPubkey(hSession->sessionId);
657 WRITE_LOG(LOG_FATAL, "auth failed for session %u", hSession->sessionId);
659 EchoHandshakeMsg(handshake, channelId, hSession->sessionId, "[E000010]:Auth failed, cannt login the device.");
663 WRITE_LOG(LOG_FATAL, "auth success for session %u", hSession->sessionId);
665 UpdateSessionAuthOk(hSession->sessionId);
666 SendAuthOkMsg(handshake, channelId, hSession->sessionId);
681 WRITE_LOG(LOG_INFO, "not enable secure, allow access for %u", hSession->sessionId);
682 UpdateSessionAuthOk(hSession->sessionId);
683 SendAuthOkMsg(handshake, channelId, hSession->sessionId);
686 WRITE_LOG(LOG_INFO, "auth bypass, allow access for %u", hSession->sessionId);
687 UpdateSessionAuthOk(hSession->sessionId);
688 SendAuthOkMsg(handshake, channelId, hSession->sessionId);
692 hSession->sessionId, handshake.version.c_str(), handshake.authType);
693 AuthRejectLowClient(handshake, channelId, hSession->sessionId);
695 } else if (GetSessionAuthStatus(hSession->sessionId) == AUTH_OK) {
696 WRITE_LOG(LOG_INFO, "session %u already auth ok", hSession->sessionId);
707 WRITE_LOG(LOG_FATAL, "invalid auth state %d for session %u", handshake.authType, hSession->sessionId);
724 WRITE_LOG(LOG_INFO, "maybe old version client for %u session", hSession->sessionId);
731 WRITE_LOG(LOG_INFO, "client auth type is %u for %u session", hSession->verifyType, hSession->sessionId);
737 uint32_t unOld = hSession->sessionId;
738 hSession->sessionId = handshake.sessionId;
747 (static_cast<HdcDaemonUART *>(clsUARTServ))->OnNewHandshakeOK(hSession->sessionId);
752 (reinterpret_cast<HdcDaemonUSB *>(clsUSBServ))->OnNewHandshakeOK(hSession->sessionId);
755 handshake.sessionId = 0;
796 Send(hSession->sessionId, channelId, CMD_KERNEL_HANDSHAKE, (uint8_t *)failedString.c_str(),
807 WRITE_LOG(LOG_INFO, "session %u handshakeOK send back CMD_KERNEL_HANDSHAKE", hSession->sessionId);
872 if (enableSecure && (GetSessionAuthStatus(hSession->sessionId) != AUTH_OK) &&
874 string authmsg = GetSessionAuthmsg(hSession->sessionId);
876 hSession->sessionId, authmsg.c_str(), command);
878 LogMsg(hSession->sessionId, channelId, MSG_FAIL, authmsg.c_str());
881 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, &count, 1);
901 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, payload, 1);
911 LogMsg(hSession->sessionId, channelId, MSG_FAIL, "debugging is not allowed");
913 Send(hSession->sessionId, channelId, CMD_KERNEL_CHANNEL_CLOSE, &count, 1);
952 bool HdcDaemon::ServerCommand(const uint32_t sessionId, const uint32_t channelId, const uint16_t command,
955 return Send(sessionId, channelId, command, reinterpret_cast<uint8_t *>(bufPtr), size) > 0;