Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
factory_configurator_client.h File Reference
factory configurator client APIs. More...
Go to the source code of this file.
Functions | |
| fcc_status_e | fcc_init (void) |
| Initiates the FCC module. | |
| fcc_status_e | fcc_finalize (void) |
| Finalizes the FCC module. | |
| fcc_status_e | fcc_storage_delete (void) |
| Cleans from the device all data that was saved during the factory process. | |
| fcc_output_info_s * | fcc_get_error_and_warning_data (void) |
| The function retrieves pointer to warning and errors structure. | |
| fcc_status_e | fcc_verify_device_configured_4mbed_cloud (void) |
| Verifies that all mandatory fields needed to connect to mbed Cloud are in place on the device. | |
| fcc_status_e | fcc_developer_flow (void) |
| This API is for developers only. | |
| fcc_status_e | fcc_secure_time_set (uint64_t time) |
| Sets Secure time. | |
| fcc_status_e | fcc_entropy_set (const uint8_t *buf, size_t buf_size) |
| Sets Entropy. | |
| fcc_status_e | fcc_rot_set (const uint8_t *buf, size_t buf_size) |
| Sets root of trust If user wishes to set his own root of trust, this function must be called after fcc_init() and fcc_entropy_set() (if user sets his own entropy), and prior to any other FCC or KCM functions. | |
| fcc_status_e | fcc_factory_disable (void) |
| Sets Factory disabled flag to disable further use of the factory flow. | |
| fcc_status_e | fcc_is_factory_disabled (bool *fcc_factory_disable) |
| Returns true if the factory flow was disabled by calling fcc_factory_disable() API, outherwise returns false. | |
| fcc_status_e | fcc_bootstrap_csr_generate (const uint8_t *key_name, size_t key_name_len, uint8_t **bootstrap_csr_out, size_t *bootstrap_csr_size_out) |
| Generates bootstrap CSR from a given private and public keys in DER encoding scheme. | |
| fcc_status_e | fcc_e2e_csr_generate (const uint8_t *key_name, size_t key_name_len, uint8_t **e2e_csr_out, size_t *e2e_csr_size_out) |
| Generates E2E CSR from a given private and public keys Further design is needed. | |
Detailed Description
factory configurator client APIs.
Definition in file factory_configurator_client.h.
Function Documentation
| fcc_status_e fcc_bootstrap_csr_generate | ( | const uint8_t * | key_name, |
| size_t | key_name_len, | ||
| uint8_t ** | bootstrap_csr_out, | ||
| size_t * | bootstrap_csr_size_out | ||
| ) |
Generates bootstrap CSR from a given private and public keys in DER encoding scheme.
Further design is needed
- Parameters:
-
key_name The key name to fetch from storage(public/private). key_name_len The key name len. bootstrap_csr_out Pointer to generated bootstrap CSR. bootstrap_csr_size_out Size of the CSR.
- Returns:
- Operation status.
| fcc_status_e fcc_developer_flow | ( | void | ) |
This API is for developers only.
You can download the `mbed_cloud_dev_credentials.c` file from the portal and thus, skip running FCU on PC side. The API reads all credentials from the `mbed_cloud_dev_credentials.c` file and stores them in the KCM. RoT, Entropy and Time configurations are not a part of fcc_developer_flow() API. Devices that need to set RoT or Entropy should call `fcc_rot_set()`/`fcc_entropy_set()` APIs before fcc_developer_flow(). If device does not have it's own time configuration and `fcc_secure_time_set()` was not called before fcc_developer_flow(), during fcc_verify_device_configured_4mbed_cloud() certificate time validity will not be checked.
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 57 of file fcc_dev_flow.c.
| fcc_status_e fcc_e2e_csr_generate | ( | const uint8_t * | key_name, |
| size_t | key_name_len, | ||
| uint8_t ** | e2e_csr_out, | ||
| size_t * | e2e_csr_size_out | ||
| ) |
Generates E2E CSR from a given private and public keys Further design is needed.
- Parameters:
-
key_name The key name to fetch from storage(public/private). key_name_len The key name len. e2e_csr_out Pointer to generated E2E CSR. e2e_csr_size_out Size of the E2E CSR.
- Returns:
- Operation status.
| fcc_status_e fcc_entropy_set | ( | const uint8_t * | buf, |
| size_t | buf_size | ||
| ) |
Sets Entropy.
If user wishes to set his own entropy, this function must be called after fcc_init() and prior to any other FCC or KCM functions.
- Parameters:
-
buf The buffer containing the entropy. buf_size The size of buf in bytes. Must be exactly FCC_ENTROPY_SIZE.
- Returns:
- Operation status.
Definition at line 191 of file factory_configurator_client.c.
| fcc_status_e fcc_factory_disable | ( | void | ) |
Sets Factory disabled flag to disable further use of the factory flow.
- Returns:
- Operation status.
Definition at line 226 of file factory_configurator_client.c.
| fcc_status_e fcc_finalize | ( | void | ) |
Finalizes the FCC module.
Finalizes and frees file storage resources.
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 92 of file factory_configurator_client.c.
| fcc_output_info_s* fcc_get_error_and_warning_data | ( | void | ) |
The function retrieves pointer to warning and errors structure.
Should be called after fcc_verify_device_configured_4mbed_cloud, when possible warning and errors was stored in the structure. The structure contains data of last fcc_verify_device_configured_4mbed_cloud run.*
- Returns:
- pointer to fcc_output_info_s structure.
Definition at line 135 of file factory_configurator_client.c.
| fcc_status_e fcc_init | ( | void | ) |
Initiates the FCC module.
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 72 of file factory_configurator_client.c.
| fcc_status_e fcc_is_factory_disabled | ( | bool * | fcc_factory_disable ) |
Returns true if the factory flow was disabled by calling fcc_factory_disable() API, outherwise returns false.
- If the factory flow is already disabled any FCC API(s) will fail.
- Parameters:
-
fcc_factory_disable An output parameter, will be set to "true" in case factory flow is already disabled, "false" otherwise.
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 240 of file factory_configurator_client.c.
| fcc_status_e fcc_rot_set | ( | const uint8_t * | buf, |
| size_t | buf_size | ||
| ) |
Sets root of trust If user wishes to set his own root of trust, this function must be called after fcc_init() and fcc_entropy_set() (if user sets his own entropy), and prior to any other FCC or KCM functions.
- Parameters:
-
buf The buffer containing the root of trust. buf_size The size of buf in bytes. Must be exactly FCC_ROT_SIZE.
- Returns:
- Operation status.
Definition at line 203 of file factory_configurator_client.c.
| fcc_status_e fcc_secure_time_set | ( | uint64_t | time ) |
Sets Secure time.
This function will set the secure time to what the user provides. Secure time must be set in order to enable certificate expiration validations.
- Parameters:
-
time The secure time to set.
- Returns:
- Operation status.
Definition at line 215 of file factory_configurator_client.c.
| fcc_status_e fcc_storage_delete | ( | void | ) |
Cleans from the device all data that was saved during the factory process.
Should be called if the process failed and needs to be executed again.
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 115 of file factory_configurator_client.c.
| fcc_status_e fcc_verify_device_configured_4mbed_cloud | ( | void | ) |
Verifies that all mandatory fields needed to connect to mbed Cloud are in place on the device.
Should be called in the end of the factory process
- Returns:
- FCC_STATUS_SUCCESS in case of success or one of the `fcc_status_e` errors otherwise.
Definition at line 144 of file factory_configurator_client.c.
Generated on Tue Jul 12 2022 16:22:13 by
1.7.2