Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: BLE Onboarding, cJSON incorrect cert length #173

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

AbeereSpark
Copy link
Collaborator

Description:

  • Fix buffer acquire issue for base64 decoding while BLE onboarding.
  • Add a method to replace enter escape sequence string (2 characters) to '\n'.
  • Add alternate function to get the correct certificate length as cJSON was giving wrong length.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with EzloPi core
  • I accept the CLA.

@lomasSE89 lomasSE89 merged commit 98a5659 into development Sep 3, 2024
Copy link
Collaborator

@lomasSE89 lomasSE89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @AbeereSpark with adding two more functions to certificates length check and replacing newline.

@@ -178,9 +208,9 @@ void print_factory_info_v3(void)
// TRACE_W("PROVISIONING-TOKEN [off: 0x%04X, size: 0x%04X]: %s", ezlopi_factory_info_v3_get_abs_address(EZLOPI_FINFO_REL_OFFSET_PROVISIONING_TOKEN, E_EZLOPI_FACTORY_INFO_CONN_DATA), EZLOPI_FINFO_LEN_PROVISIONING_TOKEN, provisioning_token ? provisioning_token : "null");
TRACE_W("CLOUD_SERVER [off: 0x%04X, size: 0x%04X]: %s", ezlopi_factory_info_v3_get_abs_address(EZLOPI_FINFO_REL_OFFSET_CLOUD_SERVER_URL, E_EZLOPI_FACTORY_INFO_CONN_DATA), EZLOPI_FINFO_LEN_CLOUD_SERVER_URL, cloud_server ? cloud_server : "null");
TRACE_W("DEVICE_TYPE [off: 0x%04X, size: 0x%04X]: %s", ezlopi_factory_info_v3_get_abs_address(EZLOPI_FINFO_REL_OFFSET_EZLOPI_DEVICE_TYPE, E_EZLOPI_FACTORY_INFO_HUB_DATA), EZLOPI_FINFO_LEN_EZLOPI_DEVICE_TYPE, device_type ? device_type : "null");
// TRACE_W("CA_CERTIFICATE [off: 0x%04X, size: 0x%04X]: \n%s", ezlopi_factory_info_v3_get_abs_address(EZLOPI_FINFO_REL_OFFSET_CA_CERTIFICATE, E_EZLOPI_FACTORY_INFO_CONN_DATA), EZLOPI_FINFO_LEN_CA_CERTIFICATE, ca_certificate ? ca_certificate : "null");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be commenting it back in the production.

@lomasSE89 lomasSE89 deleted the ios-fixes branch September 3, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants