1 (edited by raphaell 2013-12-05 07:45:01)

Topic: Non-blocking client with blocking server error -223

Hi~

Previous, I used wolfssl-2.2.2 for supporting TLS with blocking IO. But exceptionally Infinite loop occurs in trying to
wolfssl_connect()

#0 0x1007e454 in DoApplicationData ()
No symbol table info available.
0000001 0x1007faac in ProcessReply ()
No symbol table info available.
0000002 0x10069ba4 in WolfSSL_connect ()
No symbol table info available.

Not to escape wolfssl_connect(). I don't know why it occurs and method for resolving it.

I upgraded lib to latest release version(2.8.0) also used nonblocking IO only to client-side based on example/client/client.c for handling problem but I see an error (-223 which means WANT_READ) in ssl_accept() after swching to nonblocking IO.

I attached snapshot to both client and server-side when wolfssl-debugging-on.

Please let me know method for solving it.

Thank you for reading it.


Thanks,
Raphael

Post's attachments

cs.png
cs.png 147.56 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Share

Re: Non-blocking client with blocking server error -223

Hi Raphael,

What you're seeing using nonblocking I/O is expected behavior when the underlying I/O would block.  From the API document for wolfSSL_accept(), found here: http://www.yassl.com/yaSSL/Docs-cyassl- … on-io.html:

wolfSSL_accept() works with both blocking and non-blocking I/O.  When the underlying I/O is non-blocking, wolfSSL_accept() will return when the underlying I/O could not satisfy the needs of of wolfSSL_accept to continue the handshake.  In this case, a call to wolfSSL_get_error() will yield either SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.  The calling process must then repeat the call to wolfSSL_accept when data is available to read and wolfSSL will pick up where it left off.

As an example, you can look at how ./examples/server/server.c handles non-blocking I/O with NonBlockingSSL_Accept() using wolfSSL embedded SSL.

Best Regards,
Chris