mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-24 01:09:51 +00:00
Description:ciperkey不更新stateVersion
Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: Rennes0713 <zhangjie79@hisilicon.com>
This commit is contained in:
parent
041b115ec9
commit
747fd71b3d
@ -1602,21 +1602,6 @@ static int32_t UpdateLocalCipherInfoKey(const void *id)
|
||||
LNN_LOGE(LNN_LEDGER, "memcpy cipherInfo.key fail");
|
||||
return SOFTBUS_MEM_ERR;
|
||||
}
|
||||
UpdateStateVersionAndStore(BYTE_KEY_BROADCAST_CIPHER_KEY);
|
||||
if (g_localNetLedger.localInfo.accountId == 0) {
|
||||
LNN_LOGI(LNN_LEDGER, "no account info. no need update to cloud");
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
char value[SESSION_KEY_STR_LEN] = { 0 };
|
||||
if (ConvertBytesToHexString(value, SESSION_KEY_STR_LEN,
|
||||
g_localNetLedger.localInfo.cipherInfo.key, SESSION_KEY_LENGTH) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_LEDGER, "convert cipher key to string fail.");
|
||||
return SOFTBUS_KV_CONVERT_STRING_FAILED;
|
||||
}
|
||||
if (LnnLedgerDataChangeSyncToDB(DEVICE_INFO_BROADCAST_CIPHER_KEY, value, strlen(value)) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_LEDGER, "ledger cipher key change sync to cloud failed");
|
||||
}
|
||||
(void)memset_s(value, SESSION_KEY_STR_LEN, 0, SESSION_KEY_STR_LEN);
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
@ -1630,21 +1615,6 @@ static int32_t UpdateLocalCipherInfoIv(const void *id)
|
||||
LNN_LOGE(LNN_LEDGER, "memcpy cipherInfo.iv fail");
|
||||
return SOFTBUS_MEM_ERR;
|
||||
}
|
||||
UpdateStateVersionAndStore(BYTE_KEY_BROADCAST_CIPHER_IV);
|
||||
if (g_localNetLedger.localInfo.accountId == 0) {
|
||||
LNN_LOGI(LNN_LEDGER, "no account info. no need update to cloud");
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
char value[BROADCAST_IV_STR_LEN] = { 0 };
|
||||
if (ConvertBytesToHexString(value, BROADCAST_IV_STR_LEN,
|
||||
g_localNetLedger.localInfo.cipherInfo.iv, BROADCAST_IV_LEN) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_LEDGER, "convert cipher iv to string fail.");
|
||||
return SOFTBUS_KV_CONVERT_STRING_FAILED;
|
||||
}
|
||||
if (LnnLedgerDataChangeSyncToDB(DEVICE_INFO_BROADCAST_CIPHER_IV, value, strlen(value)) != SOFTBUS_OK) {
|
||||
LNN_LOGE(LNN_LEDGER, "ledger cipher iv change sync to cloud failed");
|
||||
}
|
||||
(void)memset_s(value, BROADCAST_IV_STR_LEN, 0, BROADCAST_IV_STR_LEN);
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user