dgarske wrote:

Another common pitfall (depending on your transport layer) is some stacks require getting the entire packet in which case you'd need to cache the remainder of the TLS packet for the read after the 5 byte header.

Hello dgarske! Thank you for your answer, though I have resolved that issue myself a while ago. A was monitoring this forum for a couple of days while trying various things to make it all work and discovered that the problem was indeed in transport protocol or to be precise, the way I was handling data. I totally forgot to check topic after that. Again, thank you very much.

Hi all!

I am new to wolfSSL. I am currently trying to get library working for STM32 and Wifi. I have implemented a random seed function with on chip RNG module (not SPL as it was in wolfSSL, just CMSIS) and also implemented an xtime function with valid epoch time_t (get via Wifi before starting all SSL stuff). So, everything compiles without warnings. But when I try to run a client example, I encounter a problem: the library prints an error message via serial that SSL_write has failed. I check my implementation of functions for wolfssl_SetIOSend & wolfssl_SetIORecv calls and see that first there is one TX package for 122 bytes approx and then one RX package for 5 bytes with 5 bytes received (previous values on that address are all 0's but then are 21, 3, or smth) so data indeed is transmitted.
However right after that the library states that SSL_write call has failed. Any idea what to try next?
Oh, by the way SSL version is TLSv1.2