Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Ashvinkumar Parmar cf70eca74e Merged PR 3286: Run uncrustify on cerberus-core repo
Run uncrustify on cerberus-core repo

Uncrustify Configuration file run from cerberus-core root directory,
Uncructify format run cerberus-core except below directories,

external\
projects\
cmake\

Related work items: #3970
2024-05-16 05:19:56 +00:00
Christopher Weimer 1eb2ca742d Updates for improved portability and usage.
- For types that have created static initializers and that support const instances, updated references in many APIs and instance structs to be referenced as const.  This was mostly a continuation of changes that have been slowly happening throughout the code to support these modes.
- Functions that have unused parameters have been updated to use the UNUSED macro to avoid compiler warnings.  It is not guaranteed that unused parameters are universally handled at this point, but there is much higher coverage than there used to be.
- Fixed some missing include references and naming issues, specifically on the periodic task handlers, which are relatively new.
- Updated the NIST800-108 KDF implementation to decouple it from math.h.
- Added new mock argument expectations to allow for values that are less or greater than an expected value.
- Updated protocol and manifest observers to support const instances.
- Added a 'null' app_context implementation that can be used by implementations that don't require any application context to be saved during firmware update and reset.
- Created a periodic task implementation for bare-metal environment.  The task just provides an infinite loop that will call registered handlers.
2023-05-05 18:34:44 -07:00
Christopher Weimer ad68492b8f Add flexibility to how firmware updates are handled. Improve platform porting.
There are a few changes included here:
1. Enhanced the firmware updater to provide options on how and when the recovery and revocation steps get performed.  It is now possible to always make sure the recovery image is updated and only do recovery updates and revocation after a device reset.  To easily support implementations that want to use different mechanisms for update, the firmware update handler code was refactored out of the task context into another module, with various configurations and derivations to support the desired behavior.

2. The platform abstraction for tasks put too much logic in the task context that needs to be implemented for each platform.  New task abstractions have been added that leave all the handling logic in the common code and only require the different platforms to provide a minimal wrapper for the actual task creation and execution.  This was leveraged to manage the different ways firmware update can now be handled.  Task ports for FreeRTOS were created.

3. There were a few places where the platform_clock APIs were being misused, making assumptions about the API that didn't hold across platform ports.  These usages were cleaned up.  Specifically for component attestation, the way it determined the time until the next event was not robust across platforms.  A new platform API was added to serve this use case.  This API was also required for the new platform task abstractions.

4. To avoid platform assumptions and platform API misuse, a common header file has been created that all core code now references.  This platform API header file defines the functions that will exist for any port and specifies the contract and usage of these functions.

5. There was a bug in the way the Linux platform port calculated durations that caused it to add an extra second in certain scenarios.
2022-11-16 21:48:36 +00:00
Christopher Weimer 8a31c4c54c Add PFM support for the new v2 manifest format.
The PFM, and common manifest formats, have been updated to correct some issues with the current structures and to provide additional features.  Initially, existing functionality is maintained while supporting that functionality in the new PFM structure.  Additional changes will follow to fully enable the new features supported by the new PFM structure.
2021-01-12 05:21:09 +00:00
Christopher Weimer 2c73c2d766 Return the correct event data when there is no active manifest.
The same applies if there is no host recovery image.
2020-09-30 19:36:54 -07:00
Van Bui 5f987b0369 Merged PR 1418: Add versioned event data to PCR entries
All PCR events will provide event data and some will provide versioned event data.

Related work items: #606, #638
2020-09-30 19:36:54 -07:00
Van Bui 5b89c62d30 Merged PR 1405: Include event ID and versioning to TCG event data
Related work items: #622, #627
2020-09-30 19:36:54 -07:00
Van Bui a480768eba Merged PR 1375: Fix TCG entries when no PFM is present
Provide valid TCG measurements when no PFM is present.

Related work items: #607
2020-09-30 19:36:54 -07:00
Christopher Weimer 86442ca401 Fix manifest platform ID measurements to include the NULL terminator. 2020-09-30 19:36:54 -07:00
Atul Shah e43841a929 Merged PR 1240: Add PFM/CFM/PCD Id and platform ID measurement to TCG log
This PR adds new pcr measurements to the TCG log. A measurement of PFM, CFM and PCD IDs is added to the PCR store.
Also, measurements of PFM and PCD platform IDs is added to PCR store.

Related work items: #457, #481
2020-05-01 20:10:22 -07:00
Chris Weimer b27831ad06 Initial release of Cerberus source code. 2020-03-02 17:58:57 -08:00