Skip to content

Commit

Permalink
core: fail build when CFG_INSECURE=n used with unsafe RNG seed
Browse files Browse the repository at this point in the history
A production build needs a proper RNG seed. Fail the build when
CFG_INSECURE=n is used in conjuntion with the default weak stub
implementation of plat_rng_init().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
saschahauer committed Jan 31, 2025
1 parent 287df9c commit e5991e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/tee/tee_cryp_utl.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ void __plat_rng_init(void)
}
}

#ifdef CFG_INSECURE
void plat_rng_init(void) __weak __alias("__plat_rng_init");
#endif

static TEE_Result tee_cryp_init(void)
{
Expand Down

0 comments on commit e5991e8

Please sign in to comment.