mirror of
https://github.com/openharmony/communication_softbus_lite.git
synced 2026-06-30 20:48:03 -04:00
Delete unused header files and dependencies
Signed-off-by: zgit2021 <zhaowenqiang14@huawei.com>
This commit is contained in:
@@ -31,7 +31,7 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
|
||||
"//foundation/communication/softbus_lite/interfaces/kits/transport",
|
||||
"//base/security/deviceauth/interfaces/innerkits/deviceauth_lite",
|
||||
"//third_party/mbedtls/include",
|
||||
"//base/security/deviceauth/frameworks/deviceauth_lite/source/huks_adapter/",
|
||||
"//base/security/huks/interfaces/innerkits/huks_lite",
|
||||
"//base/security/permission/interfaces/kits/permission_lite",
|
||||
]
|
||||
|
||||
@@ -81,6 +81,7 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
|
||||
public_configs = [ ":softbus_lite_config" ]
|
||||
public_deps = [
|
||||
"//base/security/deviceauth/frameworks/deviceauth_lite/source:hichainsdk",
|
||||
"//base/security/huks/interfaces/innerkits/huks_lite:huks_3.0_sdk",
|
||||
"//base/security/permission/services/permission_lite/pms_client:pms_client",
|
||||
"//build/lite/config/component/cJSON:cjson_shared",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
|
||||
@@ -27,6 +27,7 @@ if (ohos_kernel_type == "liteos_m") {
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/startup/syspara_lite/interfaces/kits",
|
||||
"//base/security/deviceauth/interfaces/innerkits/deviceauth_lite",
|
||||
"//base/security/huks/interfaces/innerkits/huks_lite",
|
||||
"//third_party/cJSON",
|
||||
"$ohos_third_party_dir/lwip_sack/include",
|
||||
]
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
#include "coap_discover.h"
|
||||
#include "discovery_error.h"
|
||||
#include "discovery_service.h"
|
||||
#include "hks_client.h"
|
||||
#include "hks_api.h"
|
||||
#include "hks_type.h"
|
||||
#include "nstackx.h"
|
||||
#include "os_adapter.h"
|
||||
#include "securec.h"
|
||||
@@ -194,7 +195,7 @@ int GetDeviceIdFromFile(char *deviceId, unsigned int len)
|
||||
{
|
||||
int ret;
|
||||
unsigned char data[MAX_VALUE_SIZE] = {0};
|
||||
struct hks_blob key = {HKS_BLOB_TYPE_KEY, data, MAX_VALUE_SIZE};
|
||||
struct HksBlob key = {sizeof(data), data};
|
||||
|
||||
if (deviceId == NULL) {
|
||||
return ERROR_FAIL;
|
||||
@@ -205,7 +206,7 @@ int GetDeviceIdFromFile(char *deviceId, unsigned int len)
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
ret = hks_generate_random(&key);
|
||||
ret = HksGenerateRandom(NULL, &key);
|
||||
if (ret != 0) {
|
||||
SOFTBUS_PRINT("[DISCOVERY] generate key fail\n");
|
||||
return ERROR_FAIL;
|
||||
|
||||
@@ -27,6 +27,7 @@ if (ohos_kernel_type == "liteos_m") {
|
||||
"//foundation/communication/softbus_lite/os_adapter/include",
|
||||
"//foundation/communication/softbus_lite/interfaces/kits/transport",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/security/huks/interfaces/innerkits/huks_lite",
|
||||
"$ohos_third_party_dir/lwip_sack/include",
|
||||
"$ohos_third_party_dir/mbedtls/include",
|
||||
]
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
#include <securec.h>
|
||||
|
||||
#include "hks_client.h"
|
||||
#include "mbedtls/gcm.h"
|
||||
|
||||
#include "data_bus_error.h"
|
||||
#include "hks_api.h"
|
||||
#include "hks_type.h"
|
||||
#include "mbedtls/gcm.h"
|
||||
#include "os_adapter.h"
|
||||
|
||||
static mbedtls_gcm_context g_aesContext;
|
||||
@@ -31,9 +31,9 @@ unsigned char* GenerateRandomIv(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct hks_blob blob = {HKS_BLOB_TYPE_IV, randomIv, IV_LEN};
|
||||
struct HksBlob blob = {sizeof(randomIv), randomIv};
|
||||
|
||||
int ret = hks_generate_random(&blob);
|
||||
int ret = HksGenerateRandom(NULL, &blob);
|
||||
if (ret != 0) {
|
||||
SOFTBUS_PRINT("[TRANS] EncryptTransData hks_generate_random fail\n");
|
||||
free(randomIv);
|
||||
|
||||
Reference in New Issue
Block a user