factory configurator client APIs. More...
|fcc_output_info_s *||fcc_get_error_and_warning_data (void)|
|fcc_status_e||fcc_time_set (uint64_t time)|
|fcc_status_e||fcc_entropy_set (const uint8_t *buf, size_t buf_size)|
|fcc_status_e||fcc_rot_set (const uint8_t *buf, size_t buf_size)|
|fcc_status_e||fcc_is_factory_disabled (bool *fcc_factory_disable)|
factory configurator client APIs.
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_entropy_set() APIs before
fcc_developer_flow(). If a device does not have its own time configuration and
fcc_time_set() was not called before
fcc_verify_device_configured_4mbed_cloud() will not check the validity of the certificate time.
If this API is called twice, without cleaning the non-volatile storage between two sequential calls, FCC_STATUS_KCM_FILE_EXIST_ERROR will be returned.
|fcc_status_e fcc_entropy_set||(||const uint8_t *||buf,|
Sets non-volatile entropy that will be used when seeding deterministic random bit generator (DRBG) instances, for random number generations. To set non-volatile entropy, call this function after fcc_init() and prior to any other FCC or KCM functions. You must use this API if your device does not have a true random number generator (TRNG).
|buf||The buffer containing the entropy.|
|buf_size||The size of buf in bytes. Must be exactly FCC_ENTROPY_SIZE.|
Sets Factory disabled flag to disable further use of the factory flow.
Finalizes the FCC module. Finalizes and frees file storage resources.
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.*
Initiates the FCC module. Must be called before any other fcc's APIs. Otherwise relevant error will be returned.
|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.
|fcc_factory_disable||An output parameter, will be set to "true" in case factory flow is already disabled, "false" otherwise.|
The function returns status of current session between the FCC and the FCU. If the returned value is true - the session should be finished in the communication layer after current message processing, if the return value is false - the session should be kept alive for next message.
|fcc_status_e fcc_rot_set||(||const uint8_t *||buf,|
|buf||The buffer containing the root of trust.|
|buf_size||The size of buf in bytes. Must be the exact size of root of trust key, as defined in device platform layer.|
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.
Sets device time. This function will set the device time to what the user provides. Device time must be set in order to enable certificate expiration validations.
|time||The device time to set. As epoch time (number of seconds that have elapsed since January 1, 1970)|
The function sets bootstrap ca identification and stores it. Should be called only after storing bootstrap ca certificate on the device.