Topic: [SOLVED] Unable to compile Random.c

When I compile wolfcrypt/src/random.c I get  an error:

#error "you need to write an os specific    wc_GenerateSeed() here"

I have no idea what this means. Please help!

Thanks

Share

Re: [SOLVED] Unable to compile Random.c

Hi will,

wolfSSL does not provide an entropy source. Instead we take advantage of entropy based on the environment the library is being compiled for. Have you defined "NO_DEV_RANDOM" perhaps? If you defined that it will cause this error to be thrown. I would encourage you to look at wolfcrypt/src/random.c and the many implementations of wc_GenerateSeed for the various platforms. Starting on or around line 1133 (look for this comment)

 /* wc_GenerateSeed Implementations */  

and going to on or around line 1590 where you encountered the error directive. Then use these as a model for writing your own version of wc_GenerateSeed if we don't support the target platform you are building for.

Which platform are you building for? Have you checked to see if it already supported?


- Kaleb

Re: [SOLVED] Unable to compile Random.c

Hi Kaleb:

You're correct. I  #define NO_DEV_RANDOM.

To solve this  issue I used a wcGenerateSeed implementation from  a older CYASSL implementation for  a STM32F1 environment and it compiled.

Thanks for help. Much appreciated.


Will

Share

Re: [SOLVED] Unable to compile Random.c

Hi will,

No problem, thank you for using the wolfSSL forums. I'm so happy we were able to assist in this matter!


- Kaleb