Closed Velho closed 1 year ago
Hello!
TLSe is async by design. You should switch to tls APIs. The SSL_* APIs are just for basic libssl compatibility. Check tlsclienthello.c and tlshelloworld.c. libssl compatibility is basic at most.
@eduardsui Thanks for the response! I'll do as you suggested.
I have question about the tls_hellowrold.c. As I assume the tls_consume_stream(..) does the handshake from the recv(..) data? Afterwards using the tls_read(..) from the tlse implementation to read from the socket?
Thanks
It seems to work, I do a loop until the connection is established, but for some reason tlse writes the headers to the stream. Is there something I am doing wrong?
My bad, I had echo there somewhere in the async event handler 😬. Thanks for the support @eduardsui. Everything seems to be working as intended.
I am currently handling my writing as,
rc = tls_write (..)
if (rc < 0)
// error
else
tls_close_notify(..)
send_pending(..)
Is that correct?
Yes, perfect.
Hello! Is it possible to run the SSL compatibility interface as asynchronous or non blocking? How is now.. Doesn't the SSL_accept returns
WANT_READ
andWANT_WRITE
incase there is more to do. Would you have any tips? Does the examples support non blocking?