From c4f483aaa2360e576387362526cfe6a113a656b9 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 4 Apr 2014 12:37:22 -0600 Subject: [PATCH] Fix order of GenerateSeed() when MQX is used with leanPSK --- ctaocrypt/src/random.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c index 86a2143b8..e9a92416e 100644 --- a/ctaocrypt/src/random.c +++ b/ctaocrypt/src/random.c @@ -527,21 +527,6 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz) return 0; } #endif /* CYASSL_MIC32MZ_RNG */ -#elif defined(CYASSL_SAFERTOS) || defined(CYASSL_LEANPSK) \ - || defined(CYASSL_IAR_ARM) - -#warning "write a real random seed!!!!, just for testing now" - -int GenerateSeed(OS_Seed* os, byte* output, word32 sz) -{ - word32 i; - for (i = 0; i < sz; i++ ) - output[i] = i; - - (void)os; - - return 0; -} #elif defined(FREESCALE_MQX) @@ -630,6 +615,22 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz) } #endif /* FREESCALE_K70_RNGA */ +#elif defined(CYASSL_SAFERTOS) || defined(CYASSL_LEANPSK) \ + || defined(CYASSL_IAR_ARM) + +#warning "write a real random seed!!!!, just for testing now" + +int GenerateSeed(OS_Seed* os, byte* output, word32 sz) +{ + word32 i; + for (i = 0; i < sz; i++ ) + output[i] = i; + + (void)os; + + return 0; +} + #elif defined(STM32F2_RNG) #undef RNG #include "stm32f2xx_rng.h"