mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-18 15:28:15 +00:00
AuthGetLatestIdByUuid just by OpenSession
Signed-off-by: bingo <wangbaoguang@huawei.com>
This commit is contained in:
parent
87457655e3
commit
615c36e3ee
@ -871,11 +871,6 @@ int32_t TransProxyCreateChanInfo(ProxyChannelInfo *chan, int32_t channelId, cons
|
||||
{
|
||||
chan->myId = channelId;
|
||||
chan->channelId = channelId;
|
||||
chan->authId = AuthGetLatestIdByUuid(appInfo->peerData.deviceId, chan->type == CONNECT_TCP);
|
||||
if (chan->authId == AUTH_INVALID_ID) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "get authId for cipher err");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
|
||||
if (GenerateRandomStr(chan->identity, sizeof(chan->identity)) != SOFTBUS_OK) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "GenerateRandomStr err");
|
||||
@ -883,6 +878,11 @@ int32_t TransProxyCreateChanInfo(ProxyChannelInfo *chan, int32_t channelId, cons
|
||||
}
|
||||
|
||||
if (appInfo->appType != APP_TYPE_AUTH) {
|
||||
chan->authId = AuthGetLatestIdByUuid(appInfo->peerData.deviceId, chan->type == CONNECT_TCP);
|
||||
if (chan->authId == AUTH_INVALID_ID) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "get authId for cipher err");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
if (SoftBusGenerateRandomArray((unsigned char *)appInfo->sessionKey, sizeof(appInfo->sessionKey))
|
||||
!= SOFTBUS_OK) {
|
||||
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "GenerateRandomArray err");
|
||||
|
Loading…
Reference in New Issue
Block a user