WolfSSL with FreeRTOS´s IP stack.

rzingler wrote on Monday, August 07, 2017:

Hi,

Has anyone ever used the FreeRTOS own TCP/IP stack with WolfSSL library? I looked at WolfSSL source code, and I did not see an option for use of FreeRTOS TCP/IP stack, only lwIP.

The WolfSSL library is the one that come with the FreeRTOS-Plus download. I´m using FreeRTOS 8.2.3.

Thanks.

heinbali01 wrote on Monday, August 07, 2017:

Hi Rafael, yes it is available. I tested it on a Xilinx Zynq.But it should work equally well on other fast CPU’s.

If you don’t mind, can you clone from https://github.com/htibosch/wolfssl

I would like to refer you to their official git repo: https://github.com/wolfSSL/wolfssl but I didn’t get the changes accepted yet. A lack of time on my side.

In wolfssl/wolfssl/wolfcrypt/settings.h, you can un-comment this line:

    #define FREERTOS_TCP

Please have a look and comment if you encounter problems.

If you connect to me by email ( h [point] tibosch [at] freertos [point] org ), I can send you a testing project that works with FreeRTOS+TCP.

Hein

Hi,
I’m trying use wolfssl with FreeRTOS+TCP, but isn’t working.
I set the callbacks like this:

int cbk_recv(WOLFSSL *ssl, char *buf, int sz, void *ctx){
   return FreeRTOS_recv( xClientSocket, buf, sz, 0 );
}
int cbk_send(WOLFSSL *ssl, char *buf, int sz, void *ctx){
    return FreeRTOS_send( xClientSocket, buf, sz, 0 );
}

and on init of wolfssl i’m calling:

wolfSSL_SetIOSend(xWolfSSL_ClientContext, cbk_send);
wolfSSL_SetIORecv(xWolfSSL_ClientContext, cbk_recv);

Now is returning VERSION_ERROR but i don’t know if is working well, because version returned is 84 (rh->pvMajor) and my version set is 3 (ssl->version.major). And i’m using the function wolfSSL_CTX_load_verify_buffer for charge the certificate.