Notice both alternatives under USE_PLATFORM_EPS are incorrect:
platGetEPS call is incorrect because it is called with non-matching parameters (size from PPSeed, buffer pointer from EPSeed);
CryptRandomGenerate is incorrect too, for the expected seed value to be random-filled is EPSeed (as the name USEPLATFORMEPS suggests).
Currently, when enabling the switch PPSeed will be left uninitialized, while EPSeed will get initialized twice, where the second initialization uses wrong size (which happens to have same value, but this shouldn't be relied on).
This is how I believe the code should have been written:
USE_PLATFORM_EPS preprocessor-switch appears only once in the code at Hierarchy.c (lines 78-88):
Notice both alternatives under USE_PLATFORM_EPS are incorrect:
Currently, when enabling the switch PPSeed will be left uninitialized, while EPSeed will get initialized twice, where the second initialization uses wrong size (which happens to have same value, but this shouldn't be relied on).
This is how I believe the code should have been written:
Also notice there is neither a declaration nor a definition for _plat__GetEPS, so the code cannot compile or link when enabling USE_PLATFORM_EPS.
For the platGetEPS one, since the sizes are the same, it doesn't really matter. It looks like a typo and I reported it.
For the uninitialized one, that looks correct. I'll report it as well.
I believe that there is no declaration of platGetEPS because it's something that a custom implementation would supply.