|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <AttestationKeyService.h>
Public Member Functions | |
| void | setSecureElement (hal::ISecureElement *se) |
| bool | init () override |
| Initializes service state. | |
| bool | start () override |
| Starts service, ensures initialized state, and attempts to provision the attestation key synchronously so dependent module inits (FIDO2 attestation certificate) find it present. Falls back to onTick retries when the secure element is not ready yet. | |
| void | stop () override |
| Stops attestation-key background processing. | |
| ServiceState | getState () const override |
| const char * | getName () const override |
| void | onTick (uint32_t nowMs) |
| Periodically attempts to ensure attestation key exists and is valid. | |
| Public Member Functions inherited from cdc::core::IService | |
| virtual | ~IService ()=default |
Static Public Attributes | |
| static constexpr uint8_t | ATTESTATION_ECC_SLOT = 0 |
Definition at line 9 of file AttestationKeyService.h.
|
inlineoverridevirtual |
Get service name (for logging/debugging)
Implements cdc::core::IService.
Definition at line 19 of file AttestationKeyService.h.
|
inlineoverridevirtual |
Get current service state
Implements cdc::core::IService.
Definition at line 18 of file AttestationKeyService.h.
|
overridevirtual |
Initializes service state.
Implements cdc::core::IService.
Definition at line 25 of file AttestationKeyService.cpp.
References cdc::core::INITIALIZED, cdc::core::STARTED, and cdc::core::UNINITIALIZED.
Referenced by start().
| void cdc::core::AttestationKeyService::onTick | ( | uint32_t | nowMs | ) |
Periodically attempts to ensure attestation key exists and is valid.
| nowMs | Current uptime in milliseconds. |
Definition at line 63 of file AttestationKeyService.cpp.
References LOG_I, RETRY_INTERVAL_MS, cdc::core::STARTED, and TAG.
|
inline |
Definition at line 13 of file AttestationKeyService.h.
|
overridevirtual |
Starts service, ensures initialized state, and attempts to provision the attestation key synchronously so dependent module inits (FIDO2 attestation certificate) find it present. Falls back to onTick retries when the secure element is not ready yet.
Implements cdc::core::IService.
Definition at line 40 of file AttestationKeyService.cpp.
References init(), LOG_I, cdc::core::STARTED, TAG, and cdc::core::UNINITIALIZED.
|
overridevirtual |
Stops attestation-key background processing.
Implements cdc::core::IService.
Definition at line 55 of file AttestationKeyService.cpp.
References cdc::core::STOPPED.
|
staticconstexpr |
Definition at line 11 of file AttestationKeyService.h.