ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_host_credentials_internal.h File Reference

Private host credential-snapshot hardening helpers. More...

#include <sys/stat.h>
#include "ra8_attributes.h"
Include dependency graph for mdl_host_credentials_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool priv_mdl_host_credential_stat_unchanged (const struct stat *before, const struct stat *after)
 Compare identity, size, mode, and nanosecond mutation metadata.

Detailed Description

Private host credential-snapshot hardening helpers.

Exposes only the pure metadata-stability decision so host tests can prove subsecond mutation rejection; no path enters portable policy.

Definition in file mdl_host_credentials_internal.h.

Function Documentation

◆ priv_mdl_host_credential_stat_unchanged()

bool priv_mdl_host_credential_stat_unchanged ( const struct stat * before,
const struct stat * after )

Compare identity, size, mode, and nanosecond mutation metadata.

Parameters
[in]beforeMetadata captured immediately after opening a regular file.
[in]afterMetadata captured after the exact bounded read and EOF probe.
Returns
Whether the descriptor-backed source remained unchanged.
Precondition
before and after are non-NULL.
Postcondition
No state is modified.
Note
Uses Darwin st_*timespec and POSIX/Linux st_*tim fields explicitly.
Since
0.1.0

Compares the complete security-relevant snapshots supplied by the caller. Neither input snapshot is modified or retained.

Return values
trueThe documented predicate holds or the requested operation completed.
falseThe predicate does not hold or validation rejected the operation.
Precondition
Every required pointer is non-null and remains valid for the call.
Postcondition
Documented outputs and the return value describe the same outcome.

Definition at line 14 of file mdl_host_credentials.c.

References RA8_PRIV.

Referenced by internal_read_credential().