Topic: Porting wolfSSL to a non-OS platform

I am trying to port the wolfssl embedded SSL library to a STM32F1 microcontroller in a OS-less environment. Raw-API of the lwIP is being used for the communication and here are the following which I think are required:

a. A custom I/O function to  connect the raw-api of the lwip with the SSL. Will need the define WOLFSSL_USER_IO
b. Create a function to generate the random numbers. Defined NO_DEV_RANDOM
c.  Provide time/ticks to the SSL functions. Defined USER_TIME & USER_TICKS
d. Defined NO_FILESYSTEM & NO_WRITEV
e. Not sure if WOLFSSL_LWIP define is needed ?

Please let me know if the above are needed to port the wolfSSL in my platform and also of any other changes/additions to it.

Thanks,
Ram

Share

Re: Porting wolfSSL to a non-OS platform

Hi Ram,

It looks like you are on the right track.

a. A custom I/O function to  connect the raw-api of the lwip with the SSL. Will need the define WOLFSSL_USER_IO

Yes, defining WOLFSSl_USER_IO lets you specify your own I/O callbacks to use with WOLFSSL.

b. Create a function to generate the random numbers. Defined NO_DEV_RANDOM

By default WOLFSSL uses /dev/urandom and /dev/random as a random seed.  We recently added support to wolfSSL for the STM32F2 hardware random number generator, which can be enabled by defining STM32F2_RNG.  You can see the implementation in <wolfssl_root>/wolfcrypt/random.c.  I'm not sure if the STM32F1 offers this as well, but it may be similar if so.  Defining NO_DEV_RANDOM will allow you to write your own GenerateSeed() function for wolfSSL to use.

c.  Provide time/ticks to the SSL functions. Defined USER_TIME & USER_TICKS

Correct.

d. Defined NO_FILESYSTEM & NO_WRITEV

These are necessary if you don't have a filesystem or writev semantics available, respectively.

e. Not sure if WOLFSSL_LWIP define is needed ?

This define builds wolfSSL to use LwIP with the BSD socket API.  In order for this to work, you must have your LwIP stack configured to use the BSD API.  If you go this route, you won't need to define WOLFSSL_USER_IO, as we have already integrated LwIP's BSD API support into wolfSSL internally.

Regarding additional items, I will send you a PM with the wolfSSL Porting Guide.  This guide will outline the areas in wolfSSL which users commonly need to change or adjust when porting wolfSSL to a new platform.  If you don't see the PM come in, please let me know.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hi Chris,
I'm trying to port the wolfSSL library in an OS-less environment.
I'd be glad if you send me the guide to port the library too.
Regards,
Ezequiel.

Share

Re: Porting wolfSSL to a non-OS platform

Hi Ezequiel,

I just sent you an email with the porting guide attached.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

I would probably benefit from this as well.  So if you could send it to me too, Chris, that would be great.

Share

Re: Porting wolfSSL to a non-OS platform

Hi ctb,

Email sent.  Also, just FYI, we're working on getting you a response to your other forum post about verifying digital signatures.

Best Regards,
Chris

7 (edited by alphonsajohny 2013-07-01 22:47:19)

Re: Porting wolfSSL to a non-OS platform

Hi Chris,
I'm trying to port the wolfSSL library in an OS-less environment.
I am thankful if you send me the guide to port the library too.

my email id is alphonsajohny1@gmail.com
Regards,
Alphonsa

Share

Re: Porting wolfSSL to a non-OS platform

Hi Alphonsa,

I just sent you an email with the porting guide attached.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hey Chris,

Is this guide available on your site or in the repo, or are you the single point of access?


SLR-

Share

Re: Porting wolfSSL to a non-OS platform

Hi SLR,

At the moment, it isn't available on our site yet.  We have plans of getting it posted, but until then, I'll just send it to you in an email.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hi Chris

Could you please share the porting guide. I am trying to use the library on a 8bit micrcontroller (atmega128).

I am trying to use the library for the purpose of digital signal verification. As I understand wolfCrypt library will be the perfect fit. However the website lists it as coming soon. Is this library available ?

Regards
Robin James

Share

Re: Porting wolfSSL to a non-OS platform

Hi Robin,

You should be receiving the porting guide via email shortly.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hi SiteAdmin!

Could you please send me porting guide too.

Best Regards,
Alexander

Share

Re: Porting wolfSSL to a non-OS platform

Hi abak2409,

I just sent you a PM.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Been scouring the web for an ideas on how to integrate wolfssl with lwip (raw).  Could you send me the porting guide as well?

Your porting guide must be promising since no one is asking any follow up questions.

Share

Re: Porting wolfSSL to a non-OS platform

Hi Gnate,

Hopefully I'll get time to publish the guide on our website soon.  I'll email it over to you for your reference.

Regarding integrating wolfSSL with LwIP, wolfSSL currently can use LwIP out-of-the-box when WOLFSSL_LWIP is defined - as long as LwIP is using the BSD style socket API. 

If you need to use the RAW LwIP API, like you mentioned above, you'll have to write and register your own I/O callbacks with wolfSSL.  Info about I/O callbacks can be found in Section 5.1.2 of the wolfSSL Manual (http://yassl.com/yaSSL/Docs-cyassl-manu … ility.html).  If you run into any questions, feel free to reach out to us at support@wolfssl.com.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hi Chris,

I am yet another one looking at implementing wolfSSL on raw LwIP without an OS. Could you please also send me a copy of the porting guide.

You are going to get tired of doing this...

Cheers,
Bart

Share

Re: Porting wolfSSL to a non-OS platform

Hi Chris,
I'm developing a smtp client on blackfin 536 platform (no OS using lwip raw),
if you have any further documentation to send me I'll be very glad.
whatever porting guides, stack/heap requirements...
Thank you in advance

Roberto

Share

Re: Porting wolfSSL to a non-OS platform

Hi Bart and Roberto,

You should both be receiving the wolfSSL Porting Guide in your email inbox soon.

Thanks,
Chris

Re: Porting wolfSSL to a non-OS platform

Thank you very much Chris,
I succeeded in porting the library to my platform.

Roberto

Share

Re: Porting wolfSSL to a non-OS platform

Hi Everyone,

Just a quick note that we now have our updated wolfSSL Porting Guide online, with a PDF version available for download:

http://yassl.com/yaSSL/Docs-cyassl-porting-guide.html

Please let us know if you have any questions.

Best Regards,
Chris

Re: Porting wolfSSL to a non-OS platform

Hello, I also use STM32F103. I use Arduino IDE.
I have tried arduino source example from github  https://github.com/wolfSSL/wolfssl/tree … DE/ARDUINO

But there are to many error. Because existing .ino example use STM32F2xxx which have hardware integrated encryption and hash.

Actually I need ssl client with RSA+AES128+SHA is already enought for me.
Please help me.

Share