Skip to content

Commit

Permalink
add more files for mbedtls for bl702
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Jul 12, 2023
1 parent 4a76880 commit b665f29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/platform/bouffalolab/common/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,10 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un
#else
constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID;

uniqueIdSpan = MutableByteSpan((uint8_t *) uniqueId, sizeof(uniqueId));
VerifyOrReturnValue(uniqueIdSpan.size() >= sizeof(uniqueId), CHIP_ERROR_INVALID_ARGUMENT);

memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId));
uniqueIdSpan.reduce_size(sizeof(uniqueId));

return CHIP_NO_ERROR;
#endif
Expand Down
2 changes: 2 additions & 0 deletions third_party/bouffalolab/bl702/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ template("bl_iot_sdk") {
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform_util.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha256.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha512.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_create.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_crt.c",
"${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509write_csr.c",
]

Expand Down

0 comments on commit b665f29

Please sign in to comment.