Topic: LwIP Raw API with WOLFSSL embedded SSL

Hello everybody,

I'm trying to implement wolfSSL embedded SSL in combination with LwIP on a STM32F4. The problem is, that im using no RTOS, and therefore no sockets. I was able to set my defines and everything builds everything without an error (USER_TIME, USER_TICKS, STM32F4 RND and CRYPT, WOLFSSL_USER_IO), but now I was looking at "io.c", where I have to redirect the SEND_FUNCTION and RECEIVE_FUNCTION to use UDP or TCP-Protocoll instead of sockets.

So I am trying to get TCP working with wolfssl but I have no idea where to start.

I know you have first to connect a tcp_connection and bind it to a port and so on, but where is for example the CONNECT_FUNCTION?
Sorry maybe it seems like a stupid question, but I don't know where i can start, maybe someone has a hint for me smile

Thanks in advance guys!
Regards Lucas

Share

Re: LwIP Raw API with WOLFSSL embedded SSL

Hi Lucas,

It sounds like you are making good progress on porting wolfSSL over to your environment.  You may have found it already, but if not, you can find the wolfSSL Porting Guide here:

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

You can write and register your own I/O callbacks for wolfSSL to use.  These callbacks would then integrate down to your LwIP layer.  The callbacks are documented both in the Porting Guide above as well as Section 5.1.2 of the wolfSSL Manual:

http://yassl.com/yaSSL/Docs-cyassl-manu … ility.html

In general, your application will handle setting up and connecting the socket, then hand it over to wolfSSL to do the SSL/TLS handshake and SSL communication from there on out.  Our SSL Tutorial may be helpful to look through (http://yassl.com/yaSSL/Docs-cyassl-manu … orial.html), or our example client and server application located in:

./examples/client/client.c
./examples/server/server.c

Best Regards,
Chris